Open monajalal opened 8 years ago
image_file_name
, try with something like this:
image_file_name = 'images/{0}.{1}'.format(search[i].id, type)
<- but still you need to parse type because it comes in format like "image/gif" GalleryAlbum
- because it has no type.
wrap your code with try/except like:
try: your code here except Exception: pass
or make an if for it handle this situationI get similar error here: http://stackoverflow.com/questions/40115380/imgurpython-helpers-error-imgurclientratelimiterror-rate-limit-exceeded The previous one was fixed
On Tue, Oct 18, 2016 at 7:24 AM, Backscratcher notifications@github.com wrote:
- I think there is a problem with Your image_file_name, try with something like this: image_file_name = 'images/{0}.{1}'.format(search[i].id, type) <- but still you need to parse type because it comes in format like "image/gif"
- It is not the only issue, I ran your code and it will fail on objects like GalleryAlbum - because it has no type. wrap your code with try/except like: try: your code here except Exception: pass or make an if for it handle this situation
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Imgur/imgurpython/issues/74#issuecomment-254491420, or mute the thread https://github.com/notifications/unsubscribe-auth/ABziNVsG6i3Oy7mvipNhrPVjA2nIOV4rks5q1LqWgaJpZM4KZVir .
What should I do when I get the following error in the middle of my running code? What's the cause for it? http://stackoverflow.com/questions/40099046/raise-imgurclienterrorjson-decoding-of-response-failed-imgurpython-helpers
My code is: