question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Playlist stops loading when there is a video that has [Video blocked in country]

See original GitHub issue

Bug report

Playlist stops loading when there is a video that is unavailable in your country, and error gets thrown. Even though there are some songs in the playlist that do not have the tag [Video blocked in country].

Checklist

[x] I have searched for similar bugs in the issues. [x] I will add the bug label to this issue.

Version Info

  • Ytmdl version: 2020.11.20-1
  • Youtube-dl version: 2020.11.17

How Ytmdl was installed?

With yay ( from the aur ) and youtube-dl with pacman

Write here how you installed ytmdl. If it was through pip or some other way. yay ytmdl pacman -S youtube-dl

Console Log

~ ytmdl https://www.youtube.com/playlist\?list\=PL-7nmTLmYrj0VQIdGrvSyoubCG4CtDC68 --level DEBUG
 ==>  Youtube playlist passed...extracting!
 ==>  Playlist: PL-7nmTLmYrj0VQIdGrvSyoubCG4CtDC68
 ==>  18 songs found
 ==>  Logger running in DEBUG mode
 ==>  Passed args: Namespace(SONG_NAME=[], album=None, artist=None, choice=None, disable_file=False, disable_metaadd=False, format='mp3', get_opts=False, ignore_errors=False, level='DEBUG', list=None, list_level=False, manual_meta=False, nolocal=False, pl_end=None, pl_items=None, pl_start=None, proxy=None, quiet=False, skip_meta=False, song=None, trim=False, url='https://www.youtube.com/watch?v=g6wvGks0D6Y')
 ==>  []
 ==>  https://www.youtube.com/watch?v=g6wvGks0D6Y
ERROR: Video unavailable
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 2029, in _real_extract
    raise ExtractorError(error_message, expected=True)
youtube_dl.utils.ExtractorError: Video unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/ytmdl", line 469, in <module>
    extract_data()
  File "/usr/bin/ytmdl", line 462, in extract_data
    main(args)
  File "/usr/bin/ytmdl", line 215, in main
    song_name = yt.get_title(args.url)
  File "/usr/lib/python3.8/site-packages/ytmdl/yt.py", line 327, in get_title
    data = ydl.extract_info(url, False)
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 820, in extract_info
    self.report_error(compat_str(e), e.format_traceback())
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 625, in report_error
    self.trouble(error_message, tb)
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 595, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Video unavailable

Description

Playlist stops loading when there is a video that is unavailable in your country, and error gets thrown. Even though there are some songs in the playlist that do not have the tag [Video blocked in country], ytmdl gives an error and does not download any songs.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
J0rdyVcommented, Nov 24, 2020

Seems to give me the same output.

ytmdl https://www.youtube.com/playlist\?list\=PL-7nmTLmYrj0VQIdGrvSyoubCG4CtDC68 --ignore-errors --level DEBUG
 ==>  Youtube playlist passed...extracting!
 ==>  Playlist: PL-7nmTLmYrj0VQIdGrvSyoubCG4CtDC68
 ==>  18 songs found
 ==>  Logger running in DEBUG mode
 ==>  Passed args: Namespace(SONG_NAME=[], album=None, artist=None, choice=None, disable_file=False, disable_metaadd=False, format='mp3', get_opts=False, ignore_errors=True, level='DEBUG', list=None, list_level=False, manual_meta=False, nolocal=False, pl_end=None, pl_items=None, pl_start=None, proxy=None, quiet=False, skip_meta=False, song=None, trim=False, url='https://www.youtube.com/watch?v=g6wvGks0D6Y')
 ==>  []
 ==>  https://www.youtube.com/watch?v=g6wvGks0D6Y
ERROR: Video unavailable
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 2029, in _real_extract
    raise ExtractorError(error_message, expected=True)
youtube_dl.utils.ExtractorError: Video unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/ytmdl", line 469, in <module>
    extract_data()
  File "/usr/bin/ytmdl", line 462, in extract_data
    main(args)
  File "/usr/bin/ytmdl", line 215, in main
    song_name = yt.get_title(args.url)
  File "/usr/lib/python3.8/site-packages/ytmdl/yt.py", line 327, in get_title
    data = ydl.extract_info(url, False)
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 820, in extract_info
    self.report_error(compat_str(e), e.format_traceback())
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 625, in report_error
    self.trouble(error_message, tb)
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 595, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Video unavailable
0reactions
J0rdyVcommented, Dec 3, 2020

Worked perfectly! Thanks 😄

✓ ytmdl https://www.youtube.com/playlist\?list\=PL-7nmTLmYrj0VQIdGrvSyoubCG4CtDC68 --ignore-errors --level DEBUG
 ==> Logger running in DEBUG mode
 ==> Passed args: Namespace(SONG_NAME=['https://www.youtube.com/playlist?list=PL-7nmTLmYrj0VQIdGrvSyoubCG4CtDC68'], quiet=False, song=None, choice=None, artist=None, album=None, disable_metaadd=False, skip_meta=False, manual_meta=False, proxy=None, url=None, list=None, nolocal=False, format='mp3', trim=False, get_opts=False, keep_chapter_name=False, pl_start=None, pl_end=None, pl_items=None, ignore_errors=True, title_as_name=False, level='DEBUG', disable_file=False, list_level=False)
 ==> Youtube playlist passed...extracting!
 ==> Playlist: Netsky - Second Nature album
 ==> 18 songs found
 ==> []
 ==> https://www.youtube.com/watch?v=g6wvGks0D6Y
ERROR: This video is not available.
 ==> None
 ==> Searching to see if already present in /home/jordy/packages/ytmdl
 ==> proxy passed: None
 ==> Passed format: mp3
 ==> Downloading Hold On in 320kbps
 ==> Saving the files to: /home/jordy/.cache/ytmdl
 ==> /home/jordy/.cache/ytmdl/Hold#On.mp3
ERROR: This video is not available.
 ==> ERROR: This video is not available.
 ==> --ignore-errors passed. Skipping this song!
 ==> []
 ==> https://www.youtube.com/watch?v=uLhDtyvsMz0
 ==> Current extracted title for the song is: `netsky & rudimental blend ft. afronaut zu`
 ==> Most extracted titles are not accurate and they affect the meta search
Would you like to change [y/n] (y):
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Update: Dec. 16] YouTube bugs/issues & pending ...
Here we are tracking all the bugs and problems found on YouTube and their status as well as any pending improvements that are...
Read more >
Video isn't available in my country/region - YouTube Help
Some YouTube videos may not be available in your country/region for the following reasons: Video owners have chosen to make their content available...
Read more >
YouTube Not Working? Try These Quick Fixes [14 Methods]
How to watch YouTube videos if banned in your country? ... There are numerous ways to fix YouTube not loading errors, and some...
Read more >
How to Watch Blocked YouTube Videos – 4 Solutions
Since YouTube blocked specific content in some countries, in this case, you can change your location to bypass YouTube regional filter. So how ......
Read more >
How to resolve the problem of YouTube loading, but not ...
It can also be that the sound device has been set to a different bitrate than what Youtube uses and the browser cannot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found