This error occurred when using youtube-dl:

[youtube] 1234567890A: Downloading webpage
[youtube] 1234567890A: Downloading video info webpage
ERROR: 1234567890A: "token" parameter not in video info for unknown reason;   
please report this issue on https://yt-dl.org/bug. 
Make sure you are using the latest version; type youtube-dl -U to update.   
Be sure to call youtube-dl with the --verbose flag and include its complete output.

I tried to uninstall youtube-dl and reinstall it, but this error reoccurred.

  • @karel I'm fairly sure that's not the issue here. To me it seems that the -U command is recognized, but disabled in the latest Ubuntu Version(s). – Markus Gratis Jun 17 '18 at 9:46
  • CLOSE VOTERS: Note the answer below which answers the question quite directly and gives details of the Debian changes leading to this unexpected behaviour from youtube-dl... – andrew.46 Jun 18 '18 at 9:52
  • 3
    I'd much rather see both posts merged to a "how do I keep this updated?" question – muru Jun 18 '18 at 14:32
  • @muru Perhaps: 'How to keep youtube-dl updated under Ubuntu 18.04?' I would be happy to create a 'Question and Answer' question and merge both questions. Incorporating: 1. The issue with the Debian patching 2. The method to update using wget 3. The method to update using pip. Then mark both existing questions as dupes? – andrew.46 Jun 19 '18 at 1:18
  • @andrew.46 "how do I keep YouTube-dl updated" period; your answer describing 1,2; karel's merged in (or the other way around - merge your answer here to the dupe). – muru Jun 19 '18 at 1:54

Update youtube-dl to the latest version.

sudo youtube-dl -U # no longer supported in Debian-based systems 

If youtube-dl cannot be updated with this command, install the latest version of youtube-dl using Alternative Python package installer (pip).

sudo apt-get remove youtube-dl
sudo apt-get install python-pip  
pip install --user youtube-dl  

In Ubuntu 14.04 and later youtube-dl is a snap package. To install it:

sudo snap install youtube-dl

The youtube-dl snap package will be updated automatically in the background when updates become available.

  • I tried it for many videos but the result is same.. I even tried to download videos using "all video downloader" but it is also not working... – user296770 Jun 22 '14 at 5:35
  • In Ubuntu 14.04 you can use the command: youtube-dl -F 'http://www.youtube.com/some-alphanumeric-string' to display a list of all the video formats that are available for any YouTube video that you want to download. For example -f 35 is the option to use to download the common 360p flv video format. For more information about the most commonly used options for youtube-dl see this answer. – karel Jun 22 '14 at 5:39
  • Result is same as previous.. Same error.. – user296770 Jun 22 '14 at 5:43
  • For an experiment try downloading the following 5-second YouTube video using this command: youtube-dl -f 18 http://www.youtube.com/watch?v=pBPPLu2x3lI This video is in the 480p mp4 format, and downloading it will help to test if you have a problem downloading only flv format videos. – karel Jun 22 '14 at 5:49
  • Same tokan error for above URL – user296770 Jun 22 '14 at 5:57

Keeping youtube-dl updated:

youtube-dl is an application that is updated every couple of weeks to match changes made by upstream services such as YouTube. Consequently keeping it update is a busy task. As of Ubuntu 18.04 there is a special issue where the Ubuntu package can no longer be 'manually' updated. Thus the command youtube-dl -U does not work with the repository version of youtube-dl.

Recent Issues with the Ubuntu package:

The Debian package managers for youtube-dl have felt that it "contains a (possibly-insecure) self-update mechanism" and have patched this auto-update mechanism completely out of the application. The bug report and discussion are here:

Debian Bug report logs - #890119
youtube-dl contains a (possibly-insecure) self-update mechanism

The patch to youtube-dl is quite extensive and arguably a little destructive. It can be seen in full here... Note the comment at the top of the patch:

Knowledgeable users will know what to do in any case.

And the good news is that are 2 very good methods for 'knowledgeable users' to keep youtube-dl updated:

1. Update using wget:

And for my own part that involves the following simple commands which remove the repository youtube-dl and manually install the most recent version:

sudo apt-get remove youtube-dl
sudo mkdir -pv /usr/local/bin
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

And now youtube-dl will function as before :). Bear in mind that you will need to periodically manually update youtube-dl (by running youtube-dl -U) rather than expect the package manager to do it for you...

2. Updating using the pip installer:

You can instead use the Alternative Python package installer (pip) to update youtube-dl as follows:

sudo apt-get remove youtube-dl
sudo apt-get install python-pip  
sudo pip install youtube-dl  

Then subsequently you can update youtube-dl by running the following:

sudo pip install --upgrade youtube_dl

And now enjoy your offline viewing of YouTube's great video offerings :).

  • youtube-dl: as you know the normal upgrade command is not working e.g. youtube-dl -U Thus having to remove and re-install using pip (not sure why) has been a common workaround. As a side effect I have noticed that when verifying the version directly after install I get a return: Bash: /usr/bin/youtube-dl: file not found. Then I find the file actually in /usr/local/bin/youtube-dl Once a reboot has occurred the file is in /usr/bin/youtube-dl Q: why is this? And what if any info can you share explaining the change of location after reboot. Perhaps add this to your answer as well. thanks – xtrchessreal Sep 27 '18 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.