JSON exception when uploading images
See original GitHub issueHello, from a few days ago I’m getting below error when trying to upload images to Telegraph. It has been working like a charm for almos half a year now, so I don’t know why now I’m having this issue. I’m not sure if it’s a server side issue or something else. Any idea? Thanks in advance!
url = telegraph.upload.upload_file(image_name)
File "/telegraph/upload.py", line 18, in upload_file
files=files
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/models.py", line 850, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
@annihilatorrrr try to use
telegraph.upload_file('./testimage.jpg')
Thanks dude it worked