Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

upload to imgbox broken #11

Closed
rj-d2 opened this issue Apr 24, 2021 · 3 comments
Closed

upload to imgbox broken #11

rj-d2 opened this issue Apr 24, 2021 · 3 comments

Comments

@rj-d2
Copy link

rj-d2 commented Apr 24, 2021

upload to imgbox ist not working anymore,

Uploading to imgbox
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home27/user/.apps/xpbot-master/auto_upload.py:1725 in <module>                               │
│                                                                                                  │
│   1722 │   media_info_duration = MediaInfo.parse(torrent_info["raw_video_file"] if "raw_video_f  │
│   1723 │   torrent_info["duration"] = str(media_info_duration.duration).split(".", 1)[0]  # Thi  │
│   1724 │   # Call function to actually take screenshots & upload them (different file)           │
│ ❱ 1725 │   console.print(take_upload_screens(duration=torrent_info["duration"],                  │
│   1726 │   │   │   │   │   │   │   │   │     upload_media_import=torrent_info["raw_video_file"]  │
│   1727 │   │   │   │   │   │   │   │   │     torrent_title_import=torrent_info["title"],         │
│   1728 │   │   │   │   │   │   │   │   │     base_path=working_folder,                           │
│                                                                                                  │
│ /home27/user/.apps/xpbot-master/images/upload_screenshots.py:191 in take_upload_screens       │
│                                                                                                  │
│   188 │   │   # Now we start the actual upload process                                           │
│   189 │   │   for host_site, host_api in upload_to_host_dict.items():                            │
│   190 │   │   │   # Call the function that actually uploads the images                           │
│ ❱ 191 │   │   │   upload_status = upload_screens(img_host=host_site, api_key=host_api, working   │
│   192 │   │   │   # Check "thumbs_links_dict" to verify images have uploaded and we have all t   │
│   193 │   │   │                                                                                  │
│   194 │   │   │   # if upload_status is equal to "failed" then we simply skip everything below   │
│                                                                                                  │
│ /home27/user/.apps/xpbot-master/images/upload_screenshots.py:122 in upload_screens            │
│                                                                                                  │
│   119 │   │   for file in os.listdir(working_folder + "/images/screenshots/"):                   │
│   120 │   │   │   list_of_images.append(working_folder + "/images/screenshots/" + file)  # app   │
│   121 │   │   asyncio.run(imgbox_upload(list_of_images))  # call the function that uploads ima   │
│ ❱ 122 │   │   logging.info(f"imgbox edit_url: {edit_url[0]}")  # log the edit url                │
│   123 │                                                                                          │
│   124 │   # return the dict so we can verify the images successfully uploaded and if so then f   │
│   125 │   return thumbs_links_dict                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError: list index out of range
@ryelogheat
Copy link
Owner

This fix should do it c9fe7b2

update the project on your end and try it again, Let me know if it works so I can close this issue

@ryelogheat
Copy link
Owner

Going to assume its working for you again and close this issue, Thanks for the report 👍

@rj-d2
Copy link
Author

rj-d2 commented Jun 2, 2021

im having trouble uploading images,
i did some testing,

Uploading to imgyukle
Uploading... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--
All images uploaded successfully

does not upload anything,
the bbcode_images.txt is empty

imgbox only allows uploading filesizes up to 10 mb (i think)
when the filesize is higher i get this error and the script stops.

Uploading to imgbox
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home27/user/.apps/xpbot-master/./auto_upload.py:1839 in <module>                             │
│                                                                                                  │
│   1836 │   media_info_duration = MediaInfo.parse(torrent_info["raw_video_file"] if "raw_video_f  │
│   1837 │   torrent_info["duration"] = str(media_info_duration.duration).split(".", 1)[0]  # Thi  │
│   1838 │   # Call function to actually take screenshots & upload them (different file)           │
│ ❱ 1839 │   console.print(take_upload_screens(duration=torrent_info["duration"],                  │
│   1840 │   │   │   │   │   │   │   │   │     upload_media_import=torrent_info["raw_video_file"]  │
│   1841 │   │   │   │   │   │   │   │   │     torrent_title_import=torrent_info["title"],         │
│   1842 │   │   │   │   │   │   │   │   │     base_path=working_folder,                           │
│                                                                                                  │
│ /home27/user/.apps/xpbot-master/images/upload_screenshots.py:198 in take_upload_screens       │
│                                                                                                  │
│   195 │   │   # Now we start the actual upload process                                           │
│   196 │   │   for host_site, host_api in upload_to_host_dict.items():                            │
│   197 │   │   │   # Call the function that actually uploads the images                           │
│ ❱ 198 │   │   │   upload_status = upload_screens(img_host=host_site, api_key=host_api, working   │
│   199 │   │   │   # Check "thumbs_links_dict" to verify images have uploaded and we have all t   │
│   200 │   │   │                                                                                  │
│   201 │   │   │   # if upload_status is equal to "failed" then we simply skip everything below   │
│                                                                                                  │
│ /home27/user/.apps/xpbot-master/images/upload_screenshots.py:129 in upload_screens            │
│                                                                                                  │
│   126 │   │   loop = asyncio.get_event_loop()                                                    │
│   127 │   │   loop.run_until_complete(imgbox_upload(list_of_images))                             │
│   128 │   │                                                                                      │
│ ❱ 129 │   │   logging.info(f"imgbox edit_url: {edit_url[0]}")  # log the edit url                │
│   130 │                                                                                          │
│   131 │   # return the dict so we can verify the images successfully uploaded and if so then f   │
│   132 │   return thumbs_links_dict                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError: list index out of range

@rj-d2 rj-d2 mentioned this issue Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants