Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Can't download new episode by using CLI. (TypeError) #49

Closed
cdrakke opened this issue Jul 25, 2020 · 4 comments
Closed

Can't download new episode by using CLI. (TypeError) #49

cdrakke opened this issue Jul 25, 2020 · 4 comments

Comments

@cdrakke
Copy link

cdrakke commented Jul 25, 2020

Error:

FETCHING: Kanojo, Okarishimasu.............................. NONE
FETCHING: Shokugeki no Soma S5.............................. NONE
FETCHING: Dokyuu Hentai HxEros.............................. NONE
FETCHING: Re Zero kara Hajimeru Isekai Seikatsu
FETCHING: Boruto - Naruto Next Generations.................. NONE
FETCHING: Sword Art Online - Alicization - War of Underworld NONE
FETCHING: Lapis ReLiGHTs.................................... FOUND (1)
Traceback (most recent call last):
  File "c:\users\drake\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\drake\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Drake\AppData\Local\Programs\Python\Python38-32\Scripts\horrible-downloader.exe\__main__.py", line 7, in <module>
  File "c:\users\drake\appdata\local\programs\python\python38-32\lib\site-packages\HorribleDownloader\cmd.py", line 257, in main
    downloads_list.extend(reversed(episodes))
TypeError: 'NoneType' object is not reversible
@mtshrmn
Copy link
Owner

mtshrmn commented Jul 25, 2020

This is a known issue that is caused by non integer episodes (#23), I don't intend to fix this issue.
The only thing you can do is not download Re:Zero. (as far as I'm aware, this is the only anime that has letters in the episode number)

@cdrakke
Copy link
Author

cdrakke commented Jul 25, 2020

I actually went on to the error file and just changed a few things.

cmd.py - LINE 256

FROM

for episodes in downloads.values():
        downloads_list.extend(reversed(episodes))

TO

for episodes in downloads.values():
        if episodes == None:
            continue
        downloads_list.extend(reversed(episodes))

Just to help people out there, however the Re:Zero issue is still on it.
This is a very noob fix, I know there are better ways to do it.

Works now

FETCHING: Kanojo, Okarishimasu.............................. NONE
FETCHING: Shokugeki no Soma S5.............................. NONE
FETCHING: Dokyuu Hentai HxEros.............................. NONE
FETCHING: Re Zero kara Hajimeru Isekai Seikatsu
FETCHING: Boruto - Naruto Next Generations.................. NONE
FETCHING: Sword Art Online - Alicization - War of Underworld NONE
FETCHING: Lapis ReLiGHTs.................................... FOUND (1)

Found 1 file to download:

Lapis ReLiGHTs - 04 [720p].mkv

would you like to proceed? [Y/n] y

@mtshrmn
Copy link
Owner

mtshrmn commented Jul 25, 2020

You're treating the symptoms and not the cause

@cdrakke
Copy link
Author

cdrakke commented Jul 25, 2020

I'm not actually pointing out the Re:Zero problem what I'm pointing out was the fact that it couldn't proceed and give the prompt to download the episode.

Traceback (most recent call last):
  File "c:\users\drake\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\drake\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Drake\AppData\Local\Programs\Python\Python38-32\Scripts\horrible-downloader.exe\__main__.py", line 7, in <module>
  File "c:\users\drake\appdata\local\programs\python\python38-32\lib\site-packages\HorribleDownloader\cmd.py", line 257, in main
    downloads_list.extend(reversed(episodes))
TypeError: 'NoneType' object is not reversible

This error here was caused by:

for episodes in downloads.values():
        downloads_list.extend(reversed(episodes))

And for that reason it doesn't give the download prompt.
It just might help people out there.

@mtshrmn mtshrmn closed this as completed Jul 28, 2020
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