JSON decoding of response failed after trying client.upload_from_path()
aldilaff opened this issue · 4 comments
aldilaff commented
I am trying to upload this gif back to imgur using
try:
print("Uploading image... ")
imageURL = client.upload_from_path('hlN3NZZ.gif', config=None, anon=False)
except ImgurClientError as e:
print(e.error_message)
print(e.status_code)
However I keep getting:
JSON decoding of response failed.
None
Could it be due to the large size of the gif?
salty-horse commented
charlieworld commented
I got the same issue when I was using client.upload_from_path() function.
any update for this issue ?
........ib/python2.7/site-packages/imgurpython/client.py", line 158, in make_request raise ImgurClientError('JSON decoding of response failed.')ImgurClientError: JSON decoding of response failed.
salty-horse commented
@charlieworld, use 1.1.7, which is the version on PyPI.
charlieworld commented
@salty-horse thanks a lot !
I fount out the problem I got is that the photo I upload was too large...... (24mb)
When I using the small image file to test it, it work !
I think I need to write another code to check the file before upload.......