Open PaladinOfHonour opened 3 weeks ago
Temporary solution as of writing: Remove or download individually any track giving an error so it gets added to the database and will be skipped upon downloading the playlist
Temporary solution as of writing: Remove or download individually any track giving an error so it gets added to the database and will be skipped upon downloading the playlist
Can you show the full traceback with rip -v <broken url>
Should be reproducible anywhere with the provided example playlist.
Checked with the new venv in python 3.11.
I think you missed the first lines, maybe not so relevant, but better to have the full log just in case.
It says that album data cannot be retrieved, so that could be part of the problem.
Basically these tracks should be skipped I guess, by capturing 403. It's weird, I saw a fix with if code == 403
somewhere here recently, but cannot find it now...
(Don't mind the .\\
in my paths, just downloading to a local directory instead of the default one)
[19:59:38] WARNING Connection pool is full, discarding connection: api.deezer.com. Connection pool size: 10 connectionpool.py:330
WARNING Connection pool is full, discarding connection: api.deezer.com. Connection pool size: 10 connectionpool.py:330
ERROR Error fetching album of track 644309822: DataException: album/89513762/tracks no data deezer.py:80
ERROR Error fetching album of track 916601802: DataException: album/138890842/tracks no data deezer.py:80
[19:59:43] ERROR Error downloading track 'Spring', retrying: 403, message='Forbidden', track.py:52
url=URL('https://e-cdns-proxy-a.dzcdn.net/mobile/1/cc75c6e244783e53305ebfffa37d76c6c6aea38af4cb5a4b1fd2cec889ea104baae942bfc41d4631237739deef68b3132d3aa1f79270caef7b182ce1d14fab9142fadf0b2fe9b144223ddc5c9
c300e3a2afca94bd5f6dacc53a9391e96d6818b')
ERROR Persistent error downloading track 'Spring', skipping: 403, message='Forbidden', track.py:68
url=URL('https://e-cdns-proxy-a.dzcdn.net/mobile/1/cc75c6e244783e53305ebfffa37d76c6c6aea38af4cb5a4b1fd2cec889ea104baae942bfc41d4631237739deef68b3132d3aa1f79270caef7b182ce1d14fab9142fadf0b2fe9b144223ddc5c9
c300e3a2afca94bd5f6dacc53a9391e96d6818b')
─────────────────────────────────────────────────────────────────────────────────────────────────────── Downloading Glow Weird Wubs ────────────────────────────────────────────────────────────────────────────────────────────────────────
Track 3 ----------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 11.7% • 16.5 MB/s • 0:00:02
Track 1 -------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4.2% • 4.5 MB/s • 0:00:06
Track 2 ----------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 11.7% • 16.4 MB/s • 0:00:03
Track 4 ----- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.8% • 3.1 MB/s • 0:00:08
Track 6 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.3% • ? • -:--:--
Track 5 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.0% • ? • -:--:--
┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ d:\01\venv\Lib\site-packages\mutagen\_util.py:251 in _openfile │
│ │
│ 248 │ │ │
│ 249 │ │ inmemory_fileobj = False │
│ 250 │ │ try: │
│ > 251 │ │ │ fileobj = open(filename, "rb+" if writable else "rb") │
│ 252 │ │ except IOError as e: │
│ 253 │ │ │ if writable and e.errno == errno.EOPNOTSUPP: │
│ 254 │ │ │ │ # Some file systems (gvfs over fuse) don't support opening │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
FileNotFoundError: [Errno 2] No such file or directory: '.\\Glow Weird Wubs\\09. Flume - Spring.mp3'
During handling of the above exception, another exception occurred:
┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ in _run_module_as_main:198 │
│ in _run_code:88 │
│ │
│ ... 26 frames hidden ... │
│ │
│ d:\Program Files\Python311\Lib\contextlib.py:137 in __enter__ │
│ │
│ 134 │ │ # they are only needed for recreation, which is not possible anymore │
│ 135 │ │ del self.args, self.kwds, self.func │
│ 136 │ │ try: │
│ > 137 │ │ │ return next(self.gen) │
│ 138 │ │ except StopIteration: │
│ 139 │ │ │ raise RuntimeError("generator didn't yield") from None │
│ 140 │
│ │
│ d:\01\venv\Lib\site-packages\mutagen\_util.py:272 in _openfile │
│ │
│ 269 │ │ │ │ except IOError as e2: │
│ 270 │ │ │ │ │ raise MutagenError(e2) │
│ 271 │ │ │ else: │
│ > 272 │ │ │ │ raise MutagenError(e) │
│ 273 │ │ │
│ 274 │ │ with fileobj as fileobj: │
│ 275 │ │ │ yield FileThing(fileobj, filename, filename) │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
MutagenError: [Errno 2] No such file or directory: '.\\Glow Weird Wubs\\09. Flume - Spring.mp3'
sys:1: RuntimeWarning: coroutine 'Playlist.download.<locals>._resolve_download' was never awaited
More info: tried downloading the tracks one by one and 2 of them, Spring and Blurred, give the same 403 error. It seems that the track link in the playlist is invalid, because I tool the shared link for Spring and in browser it resulted in page not found. But going to the album and taking link from there, it opened the track. And they have different IDs, if you pay attention.
btw, you can check the track links and other info using API link like this: https://api.deezer.com/playlist/12798749361/tracks
Somewhere in the issues here or in another project I saw someone mentioned that Deezer changes track IDs frequently and it brakes the funcionality of course.
So download errorred tracks separately is not a workaround basically, it's a solution for broken links in playlists. The only thing is that this code should skip such weird tracks and continue with the healthy ones.
So if you publish the debug log for 1 of those invalid tracks it would be a bit shorter that for the whole playlist.
I also switched over to the dev branch due to this error. However, I'm finding that streamrip is seeing the individually downloaded track (ie. the link copied when clicking to the song outside of my playlist) as different to what's in the playlist - despite same track being played.
To note, the track that downloads from the direct link copied outside the playlist works yet not in the intended playlist's directory of course. In addition to the different iD issue, it seems to have a different name when trying (well, failing) via the usual playlist link vs via streamrip search and direct track link, both working fine.
Nevertheless, I can't seem to make streamrip skip the errored playlist track after successfully running streamrip for the URL or its search command.
Could the different track names being picked-up be why the suggested workaround isn't working? I hope I missed something obvious! I neither could find anything in the manpage regarding editing the downloads and failed databases via streamrip.
Describe the bug
This is a followup to BUG #677 w.r.t. the fix for it on the dev branch
For unknown reasons certain tracks in my public deezer playlists throw
403: Forbidden
errors upon attempting to download them (first attempting to decrypt). This issue presents itself on all playlists I've tried so far, although I was able to download some albums without issue. Furthermore, downloading the problem song singular via search also works! My understanding is that after skipping the download of a forbidden song, its reference is not removed/hidden from the list of tracks in the playlist used later on in the process to delete temporary files. Causing an initialFileNotFoundError
which then cascades to sometimes mutagen file manipulation errors or something else (coroutine never awaited). This error always occurs whenRemoving dirs set()
is called withinartwork.py:19
, even if having disabelled the embedding of art in the config fileCommand Used
Debug Traceback
Config File
Operating System
Windows 11
streamrip version
2.0.5
Screenshots and recordings
No response
Additional context
Example playlist which throws error: "https://www.deezer.com/en/playlist/12798749361"
I transferred all my playlists yesterday from spotify to deezer with their transfer tool.
I'm not too familiar with the codebase, but going based off the errors and a quick perusal of some of the code. I assume the error handling of a forbidden track needs to pass/alter the state of expected tracks on which later functions rely