-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload file #1
Comments
Nice to see that this code gets some attention. |
I have attach a function upload in the Class Client POST /api/v1/upload/:path client.py
test.pyimport timeit iterations = 10 file_path =pathlib.Path('/my/path/').as_uri() print(file_path) answare = api.upload(file_path) ErrorI get following Error: JSONDecodeError: [Errno Expecting value] |
The full Error Message: JSONDecodeError Traceback (most recent call last) /usr/lib/python3/dist-packages/simplejson/init.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, use_decimal, **kw) /usr/lib/python3/dist-packages/simplejson/decoder.py in decode(self, s, _w, _PY3) /usr/lib/python3/dist-packages/simplejson/decoder.py in raw_decode(self, s, idx, _w, _PY3) JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: JSONDecodeError Traceback (most recent call last) /tmp/ipykernel_1351231/2304628905.py in upload(self, path) /tmp/ipykernel_1351231/2304628905.py in wrapper(*args, **kwargs) ~/.local/lib/python3.8/site-packages/requests/models.py in json(self, **kwargs) |
I have a problem to generate a API command to Upload files.
Do you an Idea?
The text was updated successfully, but these errors were encountered: