question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSON exception when uploading images

See original GitHub issue

Hello, 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:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
python273commented, Aug 20, 2021

@annihilatorrrr try to use telegraph.upload_file('./testimage.jpg')

0reactions
annihilatorrrrcommented, Aug 20, 2021

@annihilatorrrr try to use telegraph.upload_file('./testimage.jpg')

Thanks dude it worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

2 Fixes: Error – The Response is not a valid JSON Response
Fix 1 – The Response is not a valid JSON response ... It's pretty simple to get rid of this error and upload...
Read more >
java - Error (JSONException) when i try to upload image from ...
org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONObject. And I honestly can't understand why.
Read more >
Image Manager - JSON parse error when uploading ... - Telerik
Image Manager - JSON parse error when uploading images and Image Manager has EnableAsyncUpload set to True in UI for ASP.NET AJAX |...
Read more >
Error while trying to upload a picture. - WordPress.org
I encountered an error that doesn't allow me to upload the image. That's the error: Updating failed. Error message: The response is not...
Read more >
Issues when uploading images to a Gallery block ... - GitHub
I am seeing the same error - "The response is not a valid JSON response" - when adding an image block and either...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found