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

Traceback errors #931

Closed
BritanofBritan opened this issue Oct 27, 2020 · 10 comments
Closed

Traceback errors #931

BritanofBritan opened this issue Oct 27, 2020 · 10 comments

Comments

@BritanofBritan
Copy link

v2 stopped working, so I upgrade to v3, which was working, but it wouldn't download the files. It made what looked like 0kb placeholder files instead. Now when I try to download, I get this back:

Traceback (most recent call last):
File "/usr/local/bin/spotdl", line 6, in
from spotdl.main import console_entry_point
File "/usr/local/lib/python3.7/dist-packages/spotdl/main.py", line 10, in
from spotdl.download.downloader import DownloadManager
File "/usr/local/lib/python3.7/dist-packages/spotdl/download/downloader.py", line 12, in
from spotdl.patches.pyTube import YouTube
File "/usr/local/lib/python3.7/dist-packages/spotdl/patches/pyTube.py", line 32, in
from pytube import request
ImportError: cannot import name 'request' from 'pytube' (unknown location)

I've tried using the v3 syntax, e.g. spotdl $playlisturl (or song, etc).

I've tried uninstalling / installing spotdl and all dependent packages. Nothing's worked.

Any new developments on this?

@ghost
Copy link

ghost commented Oct 28, 2020

uninstall spotdl using pip-autoremove and reinstall it using pip spotdl.

If the issues persists, let us know.

@ghost
Copy link

ghost commented Oct 28, 2020

Actually, don't this is due to the latest Pytube updates. We'll patch it up in a week max. Feel free to open a PR with fixes if the wait is too long.

@ghost
Copy link

ghost commented Oct 28, 2020

Should be fixed in v3.1.3

Comment below if it isn't.

@ghost ghost closed this as completed Oct 28, 2020
ghost pushed a commit that referenced this issue Oct 28, 2020
Author: @Mikhail-Zex 

* moreee final changes

* final final changes
@BritanofBritan
Copy link
Author

I updated with pip3 install spotdl, after uninstalling first. It seems to start to download, but then gives errors:

Fetching Playlist...
46%|██████████████████████▉ |ETA: 01:17, 0.08min/songmultiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/usr/local/lib/python3.7/dist-packages/spotdl/download/downloader.py", line 104, in download_song
on_progress_callback = displayManager.pytube_progress_hook
File "/usr/local/lib/python3.7/dist-packages/pytube/main.py", line 103, in init
self.descramble()
File "/usr/local/lib/python3.7/dist-packages/pytube/main.py", line 123, in descramble
self.player_config_args = get_ytplayer_config(self.watch_html)[
File "/usr/local/lib/python3.7/dist-packages/pytube/extract.py", line 203, in get_ytplayer_config
return json.loads(yt_player_config)
File "/usr/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 28 (char 27)
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/bin/spotdl", line 10, in
sys.exit(console_entry_point())
File "/usr/local/lib/python3.7/dist-packages/spotdl/main.py", line 116, in console_entry_point
downloader.download_multiple_songs(songObjList)
File "/usr/local/lib/python3.7/dist-packages/spotdl/download/downloader.py", line 297, in download_multiple_songs
for song in songObjList
File "/usr/lib/python3.7/multiprocessing/pool.py", line 276, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "/usr/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 28 (char 27)

@ghost
Copy link

ghost commented Oct 29, 2020

That's because of python standard libraries okok multiprocessing library. Fixing that would mean modifying python itself. The bug has been listed from python 3.2.1 itself.

We're working on a workaround but that will take quite some time to implement. Till then you'll just have to resume the interrupted downloads.

@ghost
Copy link

ghost commented Oct 29, 2020

You shouldn't have any pytube errors or songs refusing to download errors now.

Ye?

@BritanofBritan
Copy link
Author

I'm not getting pytube errors, however, while the mp3 downloads remain 0kb files (on first attempt), I discovered the /temp directory contains mp4 files that are the full downloads. So it seems whatever's doing the conversion isn't working.

Thanks for all the help, it's a way cool app :-)

@ghost
Copy link

ghost commented Oct 30, 2020

Try reinstalling ffmpeg.
Remove, restart and re-add it to path

@percivjr
Copy link

Zero-byte files here too.

I tried re-installing ffmpeg but no improvement using v3.1.4, v3.1.3 or v3.1.2.

But after installing spotdl-3.2.0rc0 from next-rel-dev.zip, the conversion from mp4 to mp3 is working again.

(OK, I now get:
FileExistsError: [Errno 17] File exists: './Temp'
but I've knocked up a crude bash script to auto-resume on error and the job completes)

@chris-muiru
Copy link

am getting this error

~/Music » spotdl https://open.spotify.com/track/4pt5fDVTg5GhEvEtlz9dKk\?si\=d38f31de983041fb
Fetching Song...
Gathering Spotify Metadata for:
https://open.spotify.com/track/4pt5fDVTg5GhEvEtlz9dKk?si=d38f31de983041fb
Could not match any of the results on YouTube. Skipping

Traceback (most recent call last):
File "/home/kris/.local/bin/spotdl", line 8, in
sys.exit(console_entry_point())
File "/home/kris/.local/lib/python3.9/site-packages/spotdl/console/init.py", line 81, in console_entry_point
song_list = parse_query(
File "/home/kris/.local/lib/python3.9/site-packages/spotdl/parsers/query_parser.py", line 23, in parse_query
parse_request(request, format, use_youtube, generate_m3u, threads)
File "/home/kris/.local/lib/python3.9/site-packages/spotdl/parsers/query_parser.py", line 67, in parse_request
song = song_gatherer.from_spotify_url(request, output_format, use_youtube)
File "/home/kris/.local/lib/python3.9/site-packages/spotdl/search/song_gatherer.py", line 81, in from_spotify_url
raise LookupError("Could not match any of the results on YouTube for")
LookupError: Could not match any of the results on YouTube for

This issue was closed.
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