Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"IndexError: list index out of range" on 1.3.5 #35

Closed
dfenech0113 opened this issue Jan 26, 2025 · 2 comments
Closed

"IndexError: list index out of range" on 1.3.5 #35

dfenech0113 opened this issue Jan 26, 2025 · 2 comments

Comments

@dfenech0113
Copy link

dfenech0113 commented Jan 26, 2025

I was able to download some episodes, but the program is getting hung up on one of the episodes specifically: https://www.nts.live/shows/black-midi/episodes/black-midi-10th-september-2020

C:\Windows\system32>nts https://www.nts.live/shows/black-midi/episodes/black-midi-10th-september-2020
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\dfene\scoop\apps\python\current\Scripts\nts.exe\__main__.py", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\cli.py", line 87, in main
    url_matcher(arg)
    ~~~~~~~~~~~^^^^^
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\cli.py", line 65, in url_matcher
    nts.download(url=url,
    ~~~~~~~~~~~~^^^^^^^^^
                 quiet=options.quiet,
                 ^^^^^^^^^^^^^^^^^^^^
                 save_dir=download_dir)
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\downloader.py", line 63, in download
    parsed = parse_nts_data(bs)
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\downloader.py", line 174, in parse_nts_data
    genres = parse_genres(bs)
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\downloader.py", line 209, in parse_genres
    genres_box = bs.select('.episode__genres')[0]
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Running the program for "https://www.nts.live/shows/black-midi" also gets hung up on this specific episode.

@everdrone
Copy link
Owner

Thank you for posting the problematic links, speeds up the process a lot.
It should be fixed, can you try installing 1.3.6?

@dfenech0113
Copy link
Author

When running it now, the program gets hung up on https://www.nts.live/shows/black-midi/episodes/black-midi-7th-july-2020:

[mixcloud] Extracting URL: https://www.mixcloud.com/NTSRadio/black-midi-7th-july-2020/
[mixcloud] NTSRadio_black-midi-7th-july-2020: Downloading JSON metadata
[mixcloud] NTSRadio_black-midi-7th-july-2020: Downloading m3u8 information
[mixcloud] NTSRadio_black-midi-7th-july-2020: Downloading MPD manifest
[info] NTSRadio_black-midi-7th-july-2020: Downloading 1 format(s): dash-a1-x3
[download] C:\Users\dfene\Downloads\The Black Midi Variety Hour - 2020-7-7.m4a has already been downloaded
[download] 100% of   25.19MiB
adding metadata to The Black Midi Variety Hour - 2020-7-7.m4a ...
adding metadata to The Black Midi Variety Hour - 2020-7-7.m4a.part-Frag126.part ...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\dfene\scoop\apps\python\current\Scripts\nts.exe\__main__.py", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\cli.py", line 87, in main
    url_matcher(arg)
    ~~~~~~~~~~~^^^^^
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\cli.py", line 71, in url_matcher
    url_matcher(ep)
    ~~~~~~~~~~~^^^^
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\cli.py", line 65, in url_matcher
    nts.download(url=url,
    ~~~~~~~~~~~~^^^^^^^^^
                 quiet=options.quiet,
                 ^^^^^^^^^^^^^^^^^^^^
                 save_dir=download_dir)
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\downloader.py", line 144, in download
    set_metadata(os.path.join(save_dir, file), parsed, image, image_type)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\nts\downloader.py", line 312, in set_metadata
    f = music_tag.load_file(file_path)
  File "C:\Users\dfene\scoop\apps\python\current\Lib\site-packages\music_tag\__init__.py", line 66, in load_file
    raise NotImplementedError("Mutagen type {0} not implemented"
                              "".format(type(mfile)))
NotImplementedError: Mutagen type <class 'NoneType'> not implement
```ed

Not sure if this is related to the previous issue or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants