allejok96 / jw-scripts

Index or download videos and sound recordings from jw.org.
GNU General Public License v3.0
49 stars 10 forks source link

TypeError on windows 10 #33

Closed kiiqsilveira closed 3 years ago

kiiqsilveira commented 3 years ago

First of all I want to thank you for making this tool.

I've followed all the installation steps on Windows 10 but when I run some command like: jwb-index --mode filesystem --ntfs --download --lang=T

It starts indexing all categories and then throws the following error:

Traceback (most recent call last): File "C:\JWB\jw-scripts-master\jwb-index", line 53, in data = parse_broadcasting(settings) File "C:\JWB\jw-scripts-master\jwlib\parse.py", line 186, in parse_broadcasting j_media_file = get_best_video(j_media['files'], quality=s.quality, subtitles=s.hard_subtitles) File "C:\JWB\jw-scripts-master\jwlib\parse.py", line 116, in get_best_video rankings.sort() TypeError: '<' not supported between instances of 'dict' and 'dict'

Idk if it is something related to the language (Portuguese) and its special characters.

Edit: I am able to download on other languages (like TPO instead of T).

allejok96 commented 3 years ago

Thanks for the feedback. The error came from a morning worship video that had some incorrect metadata and that made the sort algorithm crash (my bad). It's fixed now.

kiiqsilveira commented 3 years ago

Hi, thanks for your quick support.

I kept downloading today and I got a similar problem with another video title:

Traceback (most recent call last):
  File "C:\JWB\jw-scripts-master\jwb-index", line 60, in <module>
    download_all(settings, data)
  File "C:\JWB\jw-scripts-master\jwlib\download.py", line 71, in download_all
    download_media(s, media, wd)
  File "C:\JWB\jw-scripts-master\jwlib\download.py", line 184, in download_media
    fsize = os.path.getsize(tmpfile)
  File "C:\Program Files\Python39\lib\genericpath.py", line 50, in getsize
    return os.stat(filename).st_size
OSError: [WinError 123] The syntax of the file name, directory name, or volume label is incorrect:: 'D:/JW2.0/jwb-T\\Ideias para Apresentações. Você Pode Ter uma Família Feliz!\n — Página 2.mp4.part'

Obs: I ran that command: jwb-index --mode filesystem --ntfs --download --category VODMinistry --lang=T --friendly

allejok96 commented 3 years ago

Newline in filename hm, just pushed a fix, hope it works.

kiiqsilveira commented 3 years ago

Thank you, it worked.