I am using cURL in windows using command propmpt. When I am executing this command:
curl -XPUT "localhost:8983/solr/techproducts/schema/feature-store" --data-binary "@/path/myFeatures.json" -H "Content-type:application/json"
I am getting following error:
Warning: Couldn't read data from file "/path/myFeatures.json", this makes an Warning: empty POST.
I have updated the file permissions and file is also present at the specific path.
What can be the possible solutions?
If you really have a file named myFeatures.json
into a folder named path
in the current folder where you're trying to submit curl
, just remove the leading slash from the path.
curl -XPUT "localhost:8983/solr/techproducts/schema/feature-store" --data-binary "@path/myFeatures.json" -H "Content-type:application/json"
On the other hand, try to specify the absolute path to your myFeatures.json
.
curl -XPUT "localhost:8983/solr/techproducts/schema/feature-store" --data-binary "@C:\your\complete\path\myFeatures.json" -H "Content-type:application/json"
I had the same problem, and in my case, it turned out that this was caused by using ~
in my path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With