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

youtube-dl not agnostic to where it is placed. #11478

Closed
HannuEKN opened this issue Dec 18, 2016 · 5 comments
Closed

youtube-dl not agnostic to where it is placed. #11478

HannuEKN opened this issue Dec 18, 2016 · 5 comments

Comments

@HannuEKN
Copy link

@HannuEKN HannuEKN commented Dec 18, 2016

$ cat  pkg_youtube-dl
LOCALBIN=$HOME/bin
curl -L https://yt-dl.org/downloads/latest/youtube-dl -o $LOCALBIN/youtube-dl
chmod u+rx $LOCALBIN/youtube-dl
$  . pkg_youtube-dl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   582    0   582    0     0    399      0 --:--:--  0:00:01 --:--:--  284k
100 1380k  100 1380k    0     0   404k      0  0:00:03  0:00:03 --:--:-- 1398k
$ youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=PrOYkHjdpdM 
bash: /usr/bin/youtube-dl: No such file or directory
$ youtube-dl --version
bash: /usr/bin/youtube-dl: No such file or directory
$ ls -l `which youtube-dl`
-rwxrw-r-- 1 hannu hannu 1413239 dec 18 15:54 /home/hannu/bin/youtube-dl
$ sha1sum `which youtube-dl`
fb1daf7808888757d95bd3902846d5623ecd8122  /home/hannu/bin/youtube-dl
## 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 *2016.12.18*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.12.18**

### Before submitting an *issue* make sure you have:
- [ ] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [x] 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)
- [ ] Question
- [ ] Other

---

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

I believe the above will be reproducible anywhere;
 please make youtube-dl be agnostic to where it resides.

---

### 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 
[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 2016.12.18
[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: {}
...

```

---

### 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**):
- Single video: https://www.youtube.com/watch?v=BaW_jenozKc
- Single video: https://youtu.be/BaW_jenozKc
- Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc

---

### 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](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). 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.
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 18, 2016

Apparently the problem is in your bash rather than youtube-dl

$ bash 
yen@NEWSLAB-PC12574:~$ . pkg_youtube-dl 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     3    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     3    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
100   582    0   582    0     0    183      0 --:--:--  0:00:03 --:--:--  2445
100 1380k  100 1380k    0     0   189k      0  0:00:07  0:00:07 --:--:--  422k
yen@NEWSLAB-PC12574:~$ export PATH=$LOCALBIN:$PATH
yen@NEWSLAB-PC12574:~$ youtube-dl 
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.
yen@NEWSLAB-PC12574:~$ youtube-dl --version
2016.12.18
yen@NEWSLAB-PC12574:~$ which youtube-dl
/home/yen/bin/youtube-dl
yen@NEWSLAB-PC12574:~$ ls -l `which youtube-dl`
-rwxr--r-- 1 yen yen 1413239 Dec 19 00:11 /home/yen/bin/youtube-dl
yen@NEWSLAB-PC12574:~$ sha1sum `which youtube-dl`
fb1daf7808888757d95bd3902846d5623ecd8122  /home/yen/bin/youtube-dl

Most likely you didn't set $PATH correctly.

@HannuEKN
Copy link
Author

@HannuEKN HannuEKN commented Dec 21, 2016

$ echo $PATH | tr ':' '\n' | head -n 1
/home/hannu/bin
$ echo $HOME/bin  # LOCALBIN above
/home/hannu/bin

In what way would you say that is "incorrect", causing the effect?

Hmm... didn't have "EXPORT " on PATH assignment in .bash_aliases - would that be it?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 21, 2016

That $PATH looks correct. I don't know the actual cause of the problem. Maybe there are aliases or functions called "youtube-dl"? Check it with type youtube-dl in bash.

@HannuEKN
Copy link
Author

@HannuEKN HannuEKN commented Dec 21, 2016

I have verified it to be working now - with "export path=..." in .bash_aliases - it seems that was the culprit.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 21, 2016

I guess you mean "export PATH=..."? That's strange to have such a statement in .bash_aliases. This file should contain aliases only.
Please close this issue if everything is working fine.

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

Successfully merging a pull request may close this issue.

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