Open Keysz opened 9 months ago
I was able to fix it, in my case. I'm not sure its helpful but seems like this error happens when some related co-routine fails? For me it failed because of the copyright tag, I temporarily fixed it locally on metadata/album.py
I also printed the copyright to see what the issue I think it fails when it is set to None.
in album.py
# In from_tidal_playlist_track_resp method I changed
_copyright = typed(resp.get("copyright"), str)
# to
copy = resp.get("copyright")
if copy is not None:
_copyright = typed(copy, str)
else:
_copyright = ""
Here is the complete log
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ C:\Users\zephyr\Code\streamrip\venv\lib\site-packages\streamrip\rip\cli.py:168 in url │ │ │ │ 165 │ │ async with Main(cfg) as main: │ │ 166 │ │ │ await main.add_all(urls) │ │ 167 │ │ │ await main.resolve() │ │ ❱ 168 │ │ │ await main.rip() │ │ 169 │ │ │ │ 170 │ │ if version_coro is not None: │ │ 171 │ │ │ latest_version, notes = await version_coro │ │ │ │ C:\Users\zephyr\Code\streamrip\venv\lib\site-packages\streamrip\rip\main.py:165 in rip │ │ │ │ 162 │ │ │ 163 │ async def rip(self): │ │ 164 │ │ """Download all resolved items.""" │ │ ❱ 165 │ │ await asyncio.gather(*[item.rip() for item in self.media]) │ │ 166 │ │ │ 167 │ async def search_interactive(self, source: str, media_type: str, query: str): │ │ 168 │ │ client = await self.get_logged_in_client(source) │ │ │ │ ... 5 frames hidden ... │ │ │ │ C:\Users\zephyr\Code\streamrip\venv\lib\site-packages\streamrip\metadata\album.py:387 in │ │ from_tidal_playlist_track_resp │ │ │ │ 384 │ │ │ year = "Unknown Year" │ │ 385 │ │ │ │ 386 │ │ print(resp.get("copyright")) │ │ ❱ 387 │ │ _copyright = typed(resp.get("copyright"), str) │ │ 388 │ │ artists = typed(resp.get("artists", []), list) │ │ 389 │ │ albumartist = ", ".join(a["name"] for a in artists) │ │ 390 │ │ if not albumartist: │ │ │ │ C:\Users\zephyr\Code\streamrip\venv\lib\site-packages\streamrip\metadata\util.py:24 in typed │ │ │ │ 21 │ │ 22 │ │ 23 def typed(thing, expected_type: Type[T]) -> T: │ │ ❱ 24 │ assert isinstance(thing, expected_type) │ │ 25 │ return thing │ │ 26 │ │ 27 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ AssertionError
During handling of the above exception, another exception occurred:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\Users\zephyr\AppData\Local\Programs\Python\Python310\lib\runpy.py:196 in _run_module_as_main │
│ │
│ 193 │ main_globals = sys.modules["main"].dict │
│ 194 │ if alter_argv: │
│ 195 │ │ sys.argv[0] = mod_spec.origin │
│ ❱ 196 │ return _run_code(code, main_globals, None, │
│ 197 │ │ │ │ │ "main", mod_spec) │
│ 198 │
│ 199 def run_module(mod_name, init_globals=None, │
│ │
│ C:\Users\zephyr\AppData\Local\Programs\Python\Python310\lib\runpy.py:86 in _run_code │
│ │
│ 83 │ │ │ │ │ loader = loader, │
│ 84 │ │ │ │ │ package = pkg_name, │
│ 85 │ │ │ │ │ spec = mod_spec) │
│ ❱ 86 │ exec(code, run_globals) │
│ 87 │ return run_globals │
│ 88 │
│ 89 def _run_module_code(code, init_globals=None, │
│ │
│ ... 14 frames hidden ... │
│ │
│ C:\Users\zephyr\AppData\Local\Programs\Python\Python310\lib\shutil.py:620 in _rmtree_unsafe │
│ │
│ 617 │ │ │ try: │
│ 618 │ │ │ │ os.unlink(fullname) │
│ 619 │ │ │ except OSError: │
│ ❱ 620 │ │ │ │ onerror(os.unlink, fullname, sys.exc_info()) │
│ 621 │ try: │
│ 622 │ │ os.rmdir(path) │
│ 623 │ except OSError: │
│ │
│ C:\Users\zephyr\AppData\Local\Programs\Python\Python310\lib\shutil.py:618 in _rmtree_unsafe │
│ │
│ 615 │ │ │ _rmtree_unsafe(fullname, onerror) │
│ 616 │ │ else: │
│ 617 │ │ │ try: │
│ ❱ 618 │ │ │ │ os.unlink(fullname) │
│ 619 │ │ │ except OSError: │
│ 620 │ │ │ │ onerror(os.unlink, fullname, sys.exc_info()) │
│ 621 │ try: │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
'C:\Users\zephyr\StreamripDownloads\Apple Music\__artwork\cover-8752636556330399257.jpg'
sys:1: RuntimeWarning: coroutine 'Playlist.download.
Describe the bug
Any rip url.com and it first fails to grab all the tracks with a TypeError that not all argument converted during string formatting and then when I rerun it - it gives me a runtime error: coroutine 'Playlist.download. was never awaited.'
It seems to be stuck on trying to download a jpg artwork cover. Not sure how to close this other process. Debug is too long for this form.
Command Used
Debug Traceback
Config File
Operating System
Windows 11
streamrip version
2.0.5
Screenshots and recordings
No response
Additional context
No response