discord-rich-presence-plex
discord-rich-presence-plex copied to clipboard
"File type invalid (1)" on upload to imgur with some albums
With certain albums, the upload will fail:
[21-05-2022 07:28:34 PM] [DEBUG] [server/7D018] Uploading image
[21-05-2022 07:28:35 PM] [ERROR] An unexpected error occured while uploading an image
Traceback (most recent call last):
File "/Users/me/discord-rich-presence-plex/services/imgur.py", line 15, in uploadImage
raise Exception(data["data"]["error"])
I'm guessing this is because the album image isn't in the format that imgur wants, but I'm not sure how the upload system works.
Add the below line in services/imgur.py after line 7 and let me know what it outputs:
logger.debug(requests.head(url).headers["content-type"])
[24-05-2022 07:59:55 PM] [DEBUG] [server/8996D] Uploading image
[24-05-2022 07:59:55 PM] [DEBUG] image/jpeg
[24-05-2022 07:59:56 PM] [ERROR] An unexpected error occured while uploading an image
Traceback (most recent call last):
File "/Users/me/discord-rich-presence-plex/services/imgur.py", line 16, in uploadImage
raise Exception(data["data"]["error"])
Exception: {'code': 1003, 'message': 'File type invalid (1)', 'type': 'ImgurException', 'exception': []}
hmm, i'd assume it'd accept jpegs right?