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

[Question] Error: '' is not a valid URL #12994

Closed
stargame25 opened this issue May 5, 2017 · 3 comments
Closed

[Question] Error: '' is not a valid URL #12994

stargame25 opened this issue May 5, 2017 · 3 comments

Comments

@stargame25
Copy link

@stargame25 stargame25 commented May 5, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.05.01. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • [ x ] I've verified and I assure that I'm running youtube-dl 2017.05.01

Before submitting an issue make sure you have:

  • [ x ] At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • [ x ] Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl -v <your command line>
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.05.01
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

How to find this exception "ERROR: '' is not a valid URL..... ", for some exceptions i made this
except (youtube_dl.utils.DownloadError,youtube_dl.utils.ContentTooShortError,youtube_dl.utils.ExtractorError,youtube_dl.utils.RegexNotFoundError) as e: print('error?')

Copy link and press ENTER
Press Ctrl+C to stop downloading
ERROR: '' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:da" ) to search YouTube
error?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 5, 2017

Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.

@dstftw dstftw closed this May 5, 2017
@stargame25
Copy link
Author

@stargame25 stargame25 commented May 5, 2017

So i have a script where i using youtube_dl and all is fully working, but for users i need to make it more easy to understand, i want to do 1 message for all errors and details will be in log file, i did some exceptions but i have 1 i don't understand and that what i explain above. So if you still don't understand, i did error for purpose ( i insert not a link just a random word ) and it's gave me my except message and some weird message:

Copy link and press ENTER #this make python get data from windows buffer
Press Ctrl+C to stop downloading #tip for user
ERROR: '' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:da" ) to search YouTube #that what i trying to figure out
error? #my message when except ......

Also there is my code, look if you want but it has russian language, try to translate.
Log file will not be created in this version of my script.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 5, 2017

It gives you exactly what it's supposed to give. A random word or an empty string is an invalid URL that is clearly stated in the error message. In case of user meant a search query by such random word there is an explanation that he may use --default-search or ytsearch.

@ytdl-org ytdl-org locked and limited conversation to collaborators May 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.