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

error in ubuntu 20, can't play from youtube #35

Closed
rexya2017 opened this issue Sep 14, 2021 · 5 comments
Closed

error in ubuntu 20, can't play from youtube #35

rexya2017 opened this issue Sep 14, 2021 · 5 comments

Comments

@rexya2017
Copy link

hello developer, i was try run this bot on ubuntu 20, but, if i use youtube services, i goting error like this:

INFO [2021-09-10 23:42:13,543]: New message p jakarta from Leon Scott Kennedy in MainThread file: init.py line 52 function run
ERROR [2021-08-19 23:42:14,393]: ERROR: vLeDFO-zeYI: YouTube said: Unable to extract video data in MainThread file: YoutubeDL.py line 523 function to_stderr
ERROR [2021-08-19 23:42:14,393]: in MainThread file: init.py line 79 function call
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
ie_result = ie.extract(url)
File "/usr/lib/python3/dist-packages/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1788, in _real_extract
raise ExtractorError(
youtube_dl.utils.ExtractorError: vLeDFO-zeYI: YouTube said: Unable to extract video data

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/TTMediaBot-2.0/bot/commands/init.py", line 71, in call
return command(arg, message.user)
File "/root/TTMediaBot-2.0/bot/commands/user_commands.py", line 37, in call
self.player.play(track_list)
File "/root/TTMediaBot-2.0/bot/player/init.py", line 58, in play
self._play(self.track.url)
File "/root/TTMediaBot-2.0/bot/player/track.py", line 27, in url
self._fetch_stream_data()
File "/root/TTMediaBot-2.0/bot/player/track.py", line 18, in _fetch_stream_data
track = self.service.get(self._url, extra_info=self.extra_info)[0]
File "/root/TTMediaBot-2.0/bot/services/yt.py", line 28, in get
info = ydl.extract_info(url, process=False)
File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 820, in extract_info
self.report_error(compat_str(e), e.format_traceback())
File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 625, in report_error
self.trouble(error_message, tb)
File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 595, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: vLeDFO-zeYI: YouTube said: Unable to extract video data
INFO [2021-08-19 23:42:14,399]: replied Error: ERROR: vLeDFO-zeYI: YouTube said: Unable to extract video data in MainThread file: init.py line 54 function run
ERROR [2021-08-19 23:42:14,421]: ERROR: vLeDFO-zeYI: YouTube said: Unable to extract video data in TTPlayerConnector file: YoutubeDL.py line 523 function to_stderr
ERROR [2021-08-19 23:42:14,795]: ERROR: vLeDFO-zeYI: YouTube said: Unable to extract video data in TTPlayerConnector file: YoutubeDL.py line 523 function to_stderr
ERROR [2021-08-19 23:42:15,256]: ERROR: vLeDFO-zeYI: YouTube said: Unable to extract video data in TTPlayerConnector file: YoutubeDL.py line 523 function to_stderr

@DraganRatkovich
Copy link
Contributor

@rexya2017 Hello,
Try pasting the link of the video you want to play and playing it via the url command with the bot.

@rexya2017
Copy link
Author

I've tried what you suggested, but the result is still I get an error in the log, and the Bot doesn't play anything.
here a log:
INFO [2021-09-17 18:23:52,286]: New message u https://www.youtube.com/watch?v=VEHNz7d4mY8 from Leon Scott Kennedy in MainThread file: init.py line 52 function run
ERROR [2021-09-17 18:23:52,874]: �[0;31mERROR:�[0m VEHNz7d4mY8: YouTube said: Unable to extract video data in TTPlayerConnector file: YoutubeDL.py line 523 function to_stderr
ERROR [2021-09-17 18:23:53,035]: �[0;31mERROR:�[0m VEHNz7d4mY8: YouTube said: Unable to extract video data in MainThread file: YoutubeDL.py line 523 function to_stderr
INFO [2021-09-17 18:23:53,037]: replied None in MainThread file: init.py line 54 function run
ERROR [2021-09-17 18:23:53,807]: �[0;31mERROR:�[0m VEHNz7d4mY8: YouTube said: Unable to extract video data in TTPlayerConnector file: YoutubeDL.py line 523 function to_stderr

@a11cf0
Copy link
Collaborator

a11cf0 commented Sep 17, 2021

@rexya2017, Either you're using an outdated version of YoutubeDl, or your provider is blocking YouTube. Make sure that you have installed YoutubeDL using pip.

@rexya2017
Copy link
Author

@rexya2017, Either you're using an outdated version of YoutubeDl, or your provider is blocking YouTube. Make sure that you have installed YoutubeDL using pip.

I've updated youtube-dl via the pip3 command, and now I get a different error.
"WARNING [2021-09-18 13:09:37,434]: Unable to download webpage: HTTP Error 429: Too Many Requests in TTPlayerConnector file: YoutubeDL.py line 607 function report_warning"
Previously I had an error like the above on a windows server, and I fixed it by adding a little configuration located in the /bot/services/yt.py file:
" 'cookiefile': 'path/to/file/youtube.com_cookies.txt',"
and the result bot back to normal. But in this ubuntu I can't do that way because I don't know how to retrieve cookies on VPS Ubuntu 20 headless machine.
If possible, please tell me how to solve this, because I think this incident is caused by capcha which must be resolved soon.

@a11cf0
Copy link
Collaborator

a11cf0 commented Sep 21, 2021

This should be fixed in the latest commit. However, the list of the required modules has been modified, so you will need to run pip install -r requirements.txt --upgrade in order to test these improvements.

@a11cf0 a11cf0 closed this as completed Sep 21, 2021
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

3 participants