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

ytmdl not doing anything #7

Closed
mehalter opened this issue Jul 15, 2018 · 23 comments
Closed

ytmdl not doing anything #7

mehalter opened this issue Jul 15, 2018 · 23 comments

Comments

@mehalter
Copy link

I am getting some strange functionality. I have done the pip install, have v0.1-r8, and have run ytmdl -s. It doesn't actually do anything.

If I run ytmdl "Fractures" for example, it completes in 1 second with no output and not files written or anything. I also get no errors, it just returns. Same if I try to pass in a URL like ytmdl --url "https://www.youtube.com/watch?v=ZCu2gwLj9ok" "Fractures".

@deepjyoti30
Copy link
Owner

Are you sure no errors were shown? I tried the exact same command and its working all right. I also have v0.1-r8. Did you try with other songs.??

@mehalter
Copy link
Author

mehalter commented Jul 19, 2018

Yup, I have also tried across distributions and multiple computers. Both Arch and Ubuntu, between 3 different computers. No error, not even an error code being sent back to the terminal. Exit status 0. Also I have tried multiple songs, with url, without, the only thing I can get it to do is help and version.

@deepjyoti30
Copy link
Owner

Can you please try the latest version?
First uninstall ytmdl by following
sudo pip uninstall ytmdl
Then install it again with the following
sudo pip install --no-cache-dir ytmdl --upgrade
And then setup config by -s flag and try.

@mehalter
Copy link
Author

Just did that, still nothing on all machines, its still v0.1-r8.

@deepjyoti30
Copy link
Owner

Please do the above steps again. Pypi takes a bit time. Please run the exact commands i gave you.

@mehalter
Copy link
Author

What is the version number I am looking for so I know I have gotten the correct version?

@deepjyoti30
Copy link
Owner

Can you check the version of installed by checking the output returned by
sudo pip install --no-cache-dir ytmdl --upgrade
If it shows version is post9 than its r9. Also, did you try ytmdl -s?

@mehalter
Copy link
Author

Ah it does say post9 on the install but ytmdl- -version returns v0.1-r8 still. Just wanted to make sure. Also Yes, I have run the commands exactly as you sent them to uninstall and reinstall, ran ytmdl -s, verified the config file was created, still absolutely no output or errors with and without specifying a url, on 2 laptops and a desktop, Ubuntu and Arch.

@deepjyoti30
Copy link
Owner

Clone the repo.
Then move to the dir and run following
python ytmdl.py "Fractures"
Please tell me if that works

@mehalter
Copy link
Author

It does not, same behavior

@deepjyoti30
Copy link
Owner

I guess it should be fixed now. I just uploaded post10 but --version will show r9, don't worry about that, check the version that pip shows. I am pretty sure its fixed now. Please uninstall and install using the command i gave you earlier

@mehalter
Copy link
Author

Ok nice, it gets to ==> Searching Youtube for Fractures, now i get

Traceback (most recent call last):
  File "/home/micah/.local/lib/python3.5/site-packages/ytmdl/yt.py", line 72, in search
    data = scan_video(url)
  File "/home/micah/.local/lib/python3.5/site-packages/ytmdl/yt.py", line 89, in scan_video
    data = requests.get(search_url).json()
  File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/micah/.local/bin/ytmdl", line 168, in <module>
    main()
  File "/home/micah/.local/bin/ytmdl", line 100, in main
    data, urls = yt.search(song_name)
  File "/home/micah/.local/lib/python3.5/site-packages/ytmdl/yt.py", line 75, in search
    video.append(data)
UnboundLocalError: local variable 'data' referenced before assignment

@deepjyoti30
Copy link
Owner

Sorry about that. I am currently looking into that. Did you try with other song names?

@mehalter
Copy link
Author

Yeah, I have tried multiple songs, haven't gotten anything to work.

@deepjyoti30
Copy link
Owner

Can you please try the following.
Clone the beta branch to a directory
Then run following
python ytmdl.py "Fractures"

@deepjyoti30
Copy link
Owner

If it prints error, please gimme the log

@mehalter
Copy link
Author

That one seems to work

@deepjyoti30
Copy link
Owner

Everything is working??

@deepjyoti30
Copy link
Owner

Can you please try the steps again an try?? I mean clone the beta again and try. ??

@mehalter
Copy link
Author

Ok, it works almost perfectly. Now if I specify something that isn't the first option for song data, the song gets put in the wrong folder. Correct information and correct meta data, but is put in the folder structure of the wrong album and artist

❯ python3 ytmdl.py --url "https://www.youtube.com/watch?v=yRMwlRmHfEI" "Brighter" 
 ==> Downloading Brighter in 320kbps
 ==> Downloaded!
 ==> Getting song data...
 ==> Data downloaded!
 ==> Setting data...
 ==> Choose One
 [1] Brighter by Hillsong Young & Free
 [2] Brighter by RÜFÜS DU SOL
 [3] Maybe by Brighter
 [4] Summer Becomes Winter by Brighter
 [5] Noah's Ark by Brighter
 [0] More results
 ==> Enter Choice [a valid choice] 2
 ==> ================================
  || YEAR: 2016-01-22T08:00:00Z
  || TITLE: Brighter
  || ARITST: RÜFÜS DU SOL
  || ALBUM: Bloom
  || GENRE: Electronic
  || TRACK NO: 1
  || ALBUM COVER ADDED
 ==> ================================
 ==> Moving to /home/micah/Music/My Music/Hillsong Young & Free/We Are Young & Free (Live)...
 ==> Done

@deepjyoti30
Copy link
Owner

That error should be fixed now.
Uninstall ytmdl and install it by the following commands
sudo pip uninstall ytmdl
sudo pip install --no-cache-dir ytmdl --upgrade

@mehalter
Copy link
Author

mehalter commented Jul 24, 2018

I am getting a hang on Downloading .... It doesn't matter if I pass in a URL or I select one from the list, it never downloads. Also this is version 0.2.post3

@deepjyoti30
Copy link
Owner

Weird. I made some changes in downloading, that might be the issue. Anyways move to the previous version vy uninstalling and then installing post2 by following
sudo pip install ytmdl==0.2.post2

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

2 participants