llama-fs icon indicating copy to clipboard operation
llama-fs copied to clipboard

[Error] "Method Not Allowed"

Open ARKye03 opened this issue 8 months ago • 8 comments

I'm using arch linux, the servers runs well. log.txt

$ curl -X POST http://127.0.0.1:8000 \                                                                        ✔
    -H "Content-Type: application/json" \
    -d '{"path": "/home/archkye/Downloads/", "instruction": "string", "incognito": false}'

returns: {"detail":"Method Not Allowed"}%

The folder exits, I'm new to this, so I don't know what other info to offer. I'm using a venv, all requirements installed correctly.

ARKye03 avatar May 29 '24 16:05 ARKye03

I think the readme is incorrect. Try posting to http://127.0.0.1:8000/batch

Jothsa avatar May 29 '24 17:05 Jothsa

I tried that, now it returns another error: Batchlog.txt

ARKye03 avatar May 29 '24 19:05 ARKye03

I fixed this error on my machine by copying the original contents of curl from the api docs link and pasted it along with replacing the downloads path in the original curl api docs contents with the downloads path structure mentioned in the readme.

curl -X 'POST'
'http://127.0.0.1:8000/batch'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{"path": "/Users/[username]/Downloads/", "instruction": "string", "incognito": true}'
"path": "string",
"instruction": "string", "incognito": true }'

However, now I'm confused because I'm left with terminal contents of: quote>

Oh, I also changed the incognito in the api docs from false to true along with the terminal curl command of incognito. Honestly, the extent of my knowledge of coding is following a readme, and I'm not sure what to do if errors occur other than search online. :P

InInfinitumEtInTenebris avatar May 30 '24 01:05 InInfinitumEtInTenebris

I fixed this error on my machine by copying the original contents of curl from the api docs link and pasted it along with replacing the downloads path in the original curl api docs contents with the downloads path structure mentioned in the readme.

curl -X 'POST' 'http://127.0.0.1:8000/batch' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"path": "/Users/[username]/Downloads/", "instruction": "string", "incognito": true}' "path": "string", "instruction": "string", "incognito": true }'

However, now I'm confused because I'm left with terminal contents of: quote>

Oh, I also changed the incognito in the api docs from false to true along with the terminal curl command of incognito. Honestly, the extent of my knowledge of coding is following a readme, and I'm not sure what to do if errors occur other than search online. :P

quote>, means that you have a "string" not closed completely, I see a < ' > at the end of the curl that seems to open a string but not closing it, if not, look for another < " > or < ' >

ARKye03 avatar May 30 '24 02:05 ARKye03