nathom / streamrip

A scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer
GNU General Public License v3.0
2.7k stars 244 forks source link

[BUG] Can't download track from Deezer #743

Closed polypores closed 1 month ago

polypores commented 1 month ago

Describe the bug

Can't download track from Deezer when using ARL.

Command Used

rip url https://www.deezer.com/en/track/395627872

Debug Traceback

[23:53:49] DEBUG    Removing dirs set()                                                                   artwork.py:19
┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ in _run_module_as_main:198                                                                       │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │   alter_argv = False                                                                         │ │
│ │         code = <code object <module> at 0x00000142F7940030, file                             │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\__m… │ │
│ │                line 1>                                                                       │ │
│ │ main_globals = {                                                                             │ │
│ │                │   '__name__': '__main__',                                                   │ │
│ │                │   '__doc__': None,                                                          │ │
│ │                │   '__package__': '',                                                        │ │
│ │                │   '__loader__': <zipimporter object                                         │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\">,  │ │
│ │                │   '__spec__': ModuleSpec(name='__main__', loader=<zipimporter object        │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\">,  │ │
│ │                origin='C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scri… │ │
│ │                │   '__annotations__': {},                                                    │ │
│ │                │   '__builtins__': <module 'builtins' (built-in)>,                           │ │
│ │                │   '__file__':                                                               │ │
│ │                'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\ri… │ │
│ │                │   '__cached__':                                                             │ │
│ │                'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\ri… │ │
│ │                │   're': <module 're' from                                                   │ │
│ │                'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\re\\__… │ │
│ │                │   ... +2                                                                    │ │
│ │                }                                                                             │ │
│ │     mod_name = '__main__'                                                                    │ │
│ │     mod_spec = ModuleSpec(name='__main__', loader=<zipimporter object                        │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\">,  │ │
│ │                origin='C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scri… │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│ in _run_code:88                                                                                  │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │       cached = 'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\ri… │ │
│ │         code = <code object <module> at 0x00000142F7940030, file                             │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\__m… │ │
│ │                line 1>                                                                       │ │
│ │        fname = 'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\ri… │ │
│ │ init_globals = None                                                                          │ │
│ │       loader = <zipimporter object                                                           │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\">   │ │
│ │     mod_name = '__main__'                                                                    │ │
│ │     mod_spec = ModuleSpec(name='__main__', loader=<zipimporter object                        │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\">,  │ │
│ │                origin='C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scri… │ │
│ │     pkg_name = ''                                                                            │ │
│ │  run_globals = {                                                                             │ │
│ │                │   '__name__': '__main__',                                                   │ │
│ │                │   '__doc__': None,                                                          │ │
│ │                │   '__package__': '',                                                        │ │
│ │                │   '__loader__': <zipimporter object                                         │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\">,  │ │
│ │                │   '__spec__': ModuleSpec(name='__main__', loader=<zipimporter object        │ │
│ │                "C:\Users\durian\AppData\Local\Programs\Python\Python312\Scripts\rip.exe\">,  │ │
│ │                origin='C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scri… │ │
│ │                │   '__annotations__': {},                                                    │ │
│ │                │   '__builtins__': <module 'builtins' (built-in)>,                           │ │
│ │                │   '__file__':                                                               │ │
│ │                'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\ri… │ │
│ │                │   '__cached__':                                                             │ │
│ │                'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\ri… │ │
│ │                │   're': <module 're' from                                                   │ │
│ │                'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\re\\__… │ │
│ │                │   ... +2                                                                    │ │
│ │                }                                                                             │ │
│ │  script_name = None                                                                          │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│                                                                                                  │
│ in <module>:7                                                                                    │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py:1157 in  │
│ __call__                                                                                         │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py:1078 in  │
│ main                                                                                             │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py:1688 in  │
│ invoke                                                                                           │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py:1434 in  │
│ invoke                                                                                           │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py:783 in   │
│ invoke                                                                                           │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\decorators.py:33 │
│ in new_func                                                                                      │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\streamrip\rip\cli.py:2 │
│ 8 in wrapper                                                                                     │
│                                                                                                  │
│    25 def coro(f):                                                                               │
│    26 │   @wraps(f)                                                                              │
│    27 │   def wrapper(*args, **kwargs):                                                          │
│ >  28 │   │   return asyncio.run(f(*args, **kwargs))                                             │
│    29 │                                                                                          │
│    30 │   return wrapper                                                                         │
│    31                                                                                            │
│                                                                                                  │
│ ┌───────────────────────────── locals ──────────────────────────────┐                            │
│ │   args = (<click.core.Context object at 0x00000142FB98AD20>,)     │                            │
│ │      f = <function url at 0x00000142FB994CC0>                     │                            │
│ │ kwargs = {'urls': ('https://www.deezer.com/en/track/395627872',)} │                            │
│ └───────────────────────────────────────────────────────────────────┘                            │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py:194 in run        │
│                                                                                                  │
│   191 │   │   │   "asyncio.run() cannot be called from a running event loop")                    │
│   192 │                                                                                          │
│   193 │   with Runner(debug=debug, loop_factory=loop_factory) as runner:                         │
│ > 194 │   │   return runner.run(main)                                                            │
│   195                                                                                            │
│   196                                                                                            │
│   197 def _cancel_all_tasks(loop):                                                               │
│                                                                                                  │
│ ┌─────────────────────────────── locals ───────────────────────────────┐                         │
│ │        debug = None                                                  │                         │
│ │ loop_factory = None                                                  │                         │
│ │         main = <coroutine object url at 0x00000142FB8BEE60>          │                         │
│ │       runner = <asyncio.runners.Runner object at 0x00000142FB8C3AA0> │                         │
│ └──────────────────────────────────────────────────────────────────────┘                         │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py:118 in run        │
│                                                                                                  │
│   115 │   │                                                                                      │
│   116 │   │   self._interrupt_count = 0                                                          │
│   117 │   │   try:                                                                               │
│ > 118 │   │   │   return self._loop.run_until_complete(task)                                     │
│   119 │   │   except exceptions.CancelledError:                                                  │
│   120 │   │   │   if self._interrupt_count > 0:                                                  │
│   121 │   │   │   │   uncancel = getattr(task, "uncancel", None)                                 │
│                                                                                                  │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │        context = <_contextvars.Context object at 0x00000142FB9CBDC0>                         │ │
│ │           coro = <coroutine object url at 0x00000142FB8BEE60>                                │ │
│ │           self = <asyncio.runners.Runner object at 0x00000142FB8C3AA0>                       │ │
│ │ sigint_handler = functools.partial(<bound method Runner._on_sigint of                        │ │
│ │                  <asyncio.runners.Runner object at 0x00000142FB8C3AA0>>, main_task=<Task     │ │
│ │                  finished name='Task-1' coro=<url() done, defined at                         │ │
│ │                  C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\… │ │
│ │                  exception=RuntimeError('aiodns needs a SelectorEventLoop on Windows. See    │ │
│ │                  more: https://github.com/saghul/aiodns/issues/86')>)                        │ │
│ │           task = <Task finished name='Task-1' coro=<url() done, defined at                   │ │
│ │                  C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\… │ │
│ │                  exception=RuntimeError('aiodns needs a SelectorEventLoop on Windows. See    │ │
│ │                  more: https://github.com/saghul/aiodns/issues/86')>                         │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py:687 in        │
│ run_until_complete                                                                               │
│                                                                                                  │
│    684 │   │   if not future.done():                                                             │
│    685 │   │   │   raise RuntimeError('Event loop stopped before Future completed.')             │
│    686 │   │                                                                                     │
│ >  687 │   │   return future.result()                                                            │
│    688 │                                                                                         │
│    689 │   def stop(self):                                                                       │
│    690 │   │   """Stop running the event loop.                                                   │
│                                                                                                  │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │   future = <Task finished name='Task-1' coro=<url() done, defined at                         │ │
│ │            C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\stream… │ │
│ │            exception=RuntimeError('aiodns needs a SelectorEventLoop on Windows. See more:    │ │
│ │            https://github.com/saghul/aiodns/issues/86')>                                     │ │
│ │ new_task = False                                                                             │ │
│ │     self = <ProactorEventLoop running=False closed=True debug=False>                         │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\streamrip\rip\cli.py:1 │
│ 66 in url                                                                                        │
│                                                                                                  │
│   163 │   │   │   version_coro = None                                                            │
│   164 │   │                                                                                      │
│   165 │   │   async with Main(cfg) as main:                                                      │
│ > 166 │   │   │   await main.add_all(urls)                                                       │
│   167 │   │   │   await main.resolve()                                                           │
│   168 │   │   │   await main.rip()                                                               │
│   169                                                                                            │
│                                                                                                  │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │          cfg = <streamrip.config.Config object at 0x00000142FB98ACF0>                        │ │
│ │          ctx = <click.core.Context object at 0x00000142FB98AD20>                             │ │
│ │         main = <streamrip.rip.main.Main object at 0x00000142FBA30740>                        │ │
│ │      updates = True                                                                          │ │
│ │         urls = ('https://www.deezer.com/en/track/395627872',)                                │ │
│ │ version_coro = <Task finished name='Task-2' coro=<latest_streamrip_version() done, defined   │ │
│ │                at                                                                            │ │
│ │                C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\st… │ │
│ │                exception=RuntimeError('aiodns needs a SelectorEventLoop on Windows. See      │ │
│ │                more: https://github.com/saghul/aiodns/issues/86')>                           │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\streamrip\rip\main.py: │
│ 121 in add_all                                                                                   │
│                                                                                                  │
│   118 │   │   │   │   │   f"[red]Found invalid url [cyan]{urls[i]}[/cyan], skipping.",           │
│   119 │   │   │   │   )                                                                          │
│   120 │   │   │   │   continue                                                                   │
│ > 121 │   │   │   url_client_pairs.append((p, await self.get_logged_in_client(p.source)))        │
│   122 │   │                                                                                      │
│   123 │   │   pendings = await asyncio.gather(                                                   │
│   124 │   │   │   *[                                                                             │
│                                                                                                  │
│ ┌──────────────────────────────────────── locals ────────────────────────────────────────┐       │
│ │                i = 0                                                                   │       │
│ │                p = <streamrip.rip.parse_url.GenericURL object at 0x00000142FBA30C50>   │       │
│ │           parsed = [<streamrip.rip.parse_url.GenericURL object at 0x00000142FBA30C50>] │       │
│ │             self = <streamrip.rip.main.Main object at 0x00000142FBA30740>              │       │
│ │ url_client_pairs = []                                                                  │       │
│ │             urls = ('https://www.deezer.com/en/track/395627872',)                      │       │
│ └────────────────────────────────────────────────────────────────────────────────────────┘       │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\streamrip\rip\main.py: │
│ 142 in get_logged_in_client                                                                      │
│                                                                                                  │
│   139 │   │   │   prompter = get_prompter(client, self.config)                                   │
│   140 │   │   │   if not prompter.has_creds():                                                   │
│   141 │   │   │   │   # Get credentials from user and log into client                            │
│ > 142 │   │   │   │   await prompter.prompt_and_login()                                          │
│   143 │   │   │   │   prompter.save()                                                            │
│   144 │   │   │   else:                                                                          │
│   145 │   │   │   │   with console.status(f"[cyan]Logging into {source}", spinner="dots"):       │
│                                                                                                  │
│ ┌──────────────────────────────────── locals ─────────────────────────────────────┐              │
│ │   client = <streamrip.client.deezer.DeezerClient object at 0x00000142FBA30830>  │              │
│ │ prompter = <streamrip.rip.prompter.DeezerPrompter object at 0x00000142FBA30C20> │              │
│ │     self = <streamrip.rip.main.Main object at 0x00000142FBA30740>               │              │
│ │   source = 'deezer'                                                             │              │
│ └─────────────────────────────────────────────────────────────────────────────────┘              │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\streamrip\rip\prompter │
│ .py:163 in prompt_and_login                                                                      │
│                                                                                                  │
│   160 │   │   │   self._prompt_creds_and_set_session_config()                                    │
│   161 │   │   while True:                                                                        │
│   162 │   │   │   try:                                                                           │
│ > 163 │   │   │   │   await self.client.login()                                                  │
│   164 │   │   │   │   break                                                                      │
│   165 │   │   │   except AuthenticationError:                                                    │
│   166 │   │   │   │   console.print("[yellow]Invalid arl, try again.")                           │
│                                                                                                  │
│ ┌────────────────────────────────── locals ───────────────────────────────────┐                  │
│ │ self = <streamrip.rip.prompter.DeezerPrompter object at 0x00000142FBA30C20> │                  │
│ └─────────────────────────────────────────────────────────────────────────────┘                  │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\streamrip\client\deeze │
│ r.py:45 in login                                                                                 │
│                                                                                                  │
│    42 │                                                                                          │
│    43 │   async def login(self):                                                                 │
│    44 │   │   # Used for track downloads                                                         │
│ >  45 │   │   self.session = await self.get_session()                                            │
│    46 │   │   arl = self.config.arl                                                              │
│    47 │   │   if not arl:                                                                        │
│    48 │   │   │   raise MissingCredentialsError                                                  │
│                                                                                                  │
│ ┌────────────────────────────────── locals ──────────────────────────────────┐                   │
│ │ self = <streamrip.client.deezer.DeezerClient object at 0x00000142FBA30830> │                   │
│ └────────────────────────────────────────────────────────────────────────────┘                   │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\streamrip\client\clien │
│ t.py:55 in get_session                                                                           │
│                                                                                                  │
│   52 │   async def get_session(headers: dict | None = None) -> aiohttp.ClientSession:            │
│   53 │   │   if headers is None:                                                                 │
│   54 │   │   │   headers = {}                                                                    │
│ > 55 │   │   return aiohttp.ClientSession(                                                       │
│   56 │   │   │   headers={"User-Agent": DEFAULT_USER_AGENT},                                     │
│   57 │   │   │   **headers,                                                                      │
│   58 │   │   )                                                                                   │
│                                                                                                  │
│ ┌─── locals ───┐                                                                                 │
│ │ headers = {} │                                                                                 │
│ └──────────────┘                                                                                 │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\client.py:341  │
│ in __init__                                                                                      │
│                                                                                                  │
│    338 │   │   │   │   )                                                                         │
│    339 │   │                                                                                     │
│    340 │   │   if connector is None:                                                             │
│ >  341 │   │   │   connector = TCPConnector(loop=loop)                                           │
│    342 │   │                                                                                     │
│    343 │   │   if connector._loop is not loop:                                                   │
│    344 │   │   │   raise RuntimeError("Session and connector has to use same event loop")        │
│                                                                                                  │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │                      auth = None                                                             │ │
│ │           auto_decompress = True                                                             │ │
│ │                  base_url = None                                                             │ │
│ │              conn_timeout = None                                                             │ │
│ │                 connector = None                                                             │ │
│ │           connector_owner = True                                                             │ │
│ │                cookie_jar = None                                                             │ │
│ │                   cookies = None                                                             │ │
│ │ fallback_charset_resolver = <function ClientSession.<lambda> at 0x00000142FA789B20>          │ │
│ │                   headers = {                                                                │ │
│ │                             │   'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64;     │ │
│ │                             rv:83.0) Gecko/20100101 Firefox/83.0'                            │ │
│ │                             }                                                                │ │
│ │            json_serialize = <function dumps at 0x00000142FA2DEAC0>                           │ │
│ │                      loop = <ProactorEventLoop running=False closed=True debug=False>        │ │
│ │            max_field_size = 8190                                                             │ │
│ │             max_line_size = 8190                                                             │ │
│ │          raise_for_status = False                                                            │ │
│ │              read_bufsize = 65536                                                            │ │
│ │              read_timeout = <_SENTINEL.sentinel: 1>                                          │ │
│ │             request_class = <class 'aiohttp.client_reqrep.ClientRequest'>                    │ │
│ │      requote_redirect_url = True                                                             │ │
│ │            response_class = <class 'aiohttp.client_reqrep.ClientResponse'>                   │ │
│ │                      self = <aiohttp.client.ClientSession object at 0x00000142FB9468A0>      │ │
│ │         skip_auto_headers = None                                                             │ │
│ │                   timeout = <_SENTINEL.sentinel: 1>                                          │ │
│ │             trace_configs = None                                                             │ │
│ │                 trust_env = False                                                            │ │
│ │                   version = HttpVersion(major=1, minor=1)                                    │ │
│ │         ws_response_class = <class 'aiohttp.client_ws.ClientWebSocketResponse'>              │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\connector.py:8 │
│ 17 in __init__                                                                                   │
│                                                                                                  │
│    814 │   │                                                                                     │
│    815 │   │   self._ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint)          │
│    816 │   │   if resolver is None:                                                              │
│ >  817 │   │   │   resolver = DefaultResolver(loop=self._loop)                                   │
│    818 │   │   self._resolver = resolver                                                         │
│    819 │   │                                                                                     │
│    820 │   │   self._use_dns_cache = use_dns_cache                                               │
│                                                                                                  │
│ ┌──────────────────────────────────────── locals ────────────────────────────────────────┐       │
│ │  enable_cleanup_closed = False                                                         │       │
│ │                 family = <AddressFamily.AF_UNSPEC: 0>                                  │       │
│ │            fingerprint = None                                                          │       │
│ │            force_close = False                                                         │       │
│ │   happy_eyeballs_delay = 0.25                                                          │       │
│ │             interleave = None                                                          │       │
│ │      keepalive_timeout = <_SENTINEL.sentinel: 1>                                       │       │
│ │                  limit = 100                                                           │       │
│ │         limit_per_host = 0                                                             │       │
│ │             local_addr = None                                                          │       │
│ │                   loop = <ProactorEventLoop running=False closed=True debug=False>     │       │
│ │               resolver = None                                                          │       │
│ │                   self = <aiohttp.connector.TCPConnector object at 0x00000142FB8EC9E0> │       │
│ │                    ssl = True                                                          │       │
│ │            ssl_context = None                                                          │       │
│ │ timeout_ceil_threshold = 5                                                             │       │
│ │          ttl_dns_cache = 10                                                            │       │
│ │          use_dns_cache = True                                                          │       │
│ │             verify_ssl = True                                                          │       │
│ └────────────────────────────────────────────────────────────────────────────────────────┘       │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\resolver.py:94 │
│ in __init__                                                                                      │
│                                                                                                  │
│    91 │   │   if aiodns is None:                                                                 │
│    92 │   │   │   raise RuntimeError("Resolver requires aiodns library")                         │
│    93 │   │                                                                                      │
│ >  94 │   │   self._resolver = aiodns.DNSResolver(*args, **kwargs)                               │
│    95 │   │                                                                                      │
│    96 │   │   if not hasattr(self._resolver, "gethostbyname"):                                   │
│    97 │   │   │   # aiodns 1.1 is not available, fallback to DNSResolver.query                   │
│                                                                                                  │
│ ┌──────────────────────────────── locals ────────────────────────────────┐                       │
│ │   args = ()                                                            │                       │
│ │ kwargs = {}                                                            │                       │
│ │   loop = <ProactorEventLoop running=False closed=True debug=False>     │                       │
│ │   self = <aiohttp.resolver.AsyncResolver object at 0x00000142FB9883E0> │                       │
│ └────────────────────────────────────────────────────────────────────────┘                       │
│                                                                                                  │
│ C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiodns\__init__.py:60  │
│ in __init__                                                                                      │
│                                                                                                  │
│    57 │   │   │   │   try:                                                                       │
│    58 │   │   │   │   │   import winloop                                                         │
│    59 │   │   │   │   │   if not isinstance(self.loop , winloop.Loop):                           │
│ >  60 │   │   │   │   │   │   raise RuntimeError(                                                │
│    61 │   │   │   │   │   │   │   'aiodns needs a SelectorEventLoop on Windows. See more: http   │
│    62 │   │   │   │   except ModuleNotFoundError:                                                │
│    63 │   │   │   │   │   raise RuntimeError(                                                    │
│                                                                                                  │
│ ┌─────────────────────────────────────────── locals ───────────────────────────────────────────┐ │
│ │      kwargs = {}                                                                             │ │
│ │        loop = None                                                                           │ │
│ │ nameservers = None                                                                           │ │
│ │        self = <aiodns.DNSResolver object at 0x00000142FBA30D10>                              │ │
│ │     winloop = <module 'winloop' from                                                         │ │
│ │               'C:\\Users\\durian\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-pa… │ │
│ └──────────────────────────────────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
RuntimeError: aiodns needs a SelectorEventLoop on Windows. See more: https://github.com/saghul/aiodns/issues/86
Exception ignored in: <bound method BaseEventLoop.call_exception_handler of <ProactorEventLoop running=False closed=True debug=False>>
Traceback (most recent call last):
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1853, in call_exception_handler
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1568, in error
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1684, in _log
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1700, in handle
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1762, in callHandlers
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1028, in handle
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 168, in emit
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 229, in render
  File "C:\Users\durian\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\_log_render.py", line 43, in __call__
ImportError: sys.meta_path is None, Python is likely shutting down

Config File

[downloads]
# Folder where tracks are downloaded to
folder = "C:\\Users\\durian\\StreamripDownloads"
# Put Qobuz albums in a 'Qobuz' folder, Tidal albums in 'Tidal' etc.
source_subdirectories = false

# Download (and convert) tracks all at once, instead of sequentially. 
# If you are converting the tracks, or have fast internet, this will 
# substantially improve processing speed.
concurrency = true
# The maximum number of tracks to download at once
# If you have very fast internet, you will benefit from a higher value,
# A value that is too high for your bandwidth may cause slowdowns
# Set to -1 for no limit
max_connections = 6
# Max number of API requests per source to handle per minute
# Set to -1 for no limit
requests_per_minute = 60

[qobuz]
# 1: 320kbps MP3, 2: 16/44.1, 3: 24/<=96, 4: 24/>=96
quality = 3
# This will download booklet pdfs that are included with some albums
download_booklets = true

# Authenticate to Qobuz using auth token? Value can be true/false only
use_auth_token = false
# Enter your userid if the above use_auth_token is set to true, else enter your email
email_or_userid = ""
# Enter your auth token if the above use_auth_token is set to true, else enter the md5 hash of your plaintext password
password_or_token = ""
# Do not change
app_id = ""
# Do not change
secrets = []

[tidal]
# 0: 256kbps AAC, 1: 320kbps AAC, 2: 16/44.1 "HiFi" FLAC, 3: 24/44.1 "MQA" FLAC
quality = 3
# This will download videos included in Video Albums.
download_videos = true

# Do not change any of the fields below
user_id = ""
country_code = ""
access_token = ""
refresh_token = ""
# Tokens last 1 week after refresh. This is the Unix timestamp of the expiration
# time. If you haven't used streamrip in more than a week, you may have to log
# in again using `rip config --tidal`
token_expiry = ""

[deezer]
# 0, 1, or 2
# This only applies to paid Deezer subscriptions. Those using deezloader
# are automatically limited to quality = 1
quality = 2
# An authentication cookie that allows streamrip to use your Deezer account
# See https://github.com/nathom/streamrip/wiki/Finding-Your-Deezer-ARL-Cookie
# for instructions on how to find this
arl = ""
# This allows for free 320kbps MP3 downloads from Deezer
# If an arl is provided, deezloader is never used
use_deezloader = true
# This warns you when the paid deezer account is not logged in and rip falls
# back to deezloader, which is unreliable
deezloader_warnings = true

[soundcloud]
# Only 0 is available for now
quality = 0
# This changes periodically, so it needs to be updated
client_id = ""
app_version = ""

[youtube]
# Only 0 is available for now
quality = 0
# Download the video along with the audio
download_videos = false
# The path to download the videos to
video_downloads_folder = "C:\\Users\\durian\\StreamripDownloads\\YouTubeVideos"

[database]
# Create a database that contains all the track IDs downloaded so far
# Any time a track logged in the database is requested, it is skipped
# This can be disabled temporarily with the --no-db flag
downloads_enabled = true
# Path to the downloads database 
downloads_path = "C:\\Users\\durian\\AppData\\Roaming\\streamrip\\downloads.db"
# If a download fails, the item ID is stored here. Then, `rip repair` can be
# called to retry the downloads
failed_downloads_enabled = true
failed_downloads_path = "C:\\Users\\durian\\AppData\\Roaming\\streamrip\\failed_downloads.db"

# Convert tracks to a codec after downloading them.
[conversion]
enabled = false
# FLAC, ALAC, OPUS, MP3, VORBIS, or AAC
codec = "ALAC"
# In Hz. Tracks are downsampled if their sampling rate is greater than this. 
# Value of 48000 is recommended to maximize quality and minimize space
sampling_rate = 48000
# Only 16 and 24 are available. It is only applied when the bit depth is higher
# than this value.
bit_depth = 24
# Only applicable for lossy codecs
lossy_bitrate = 320

# Filter a Qobuz artist's discography. Set to 'true' to turn on a filter.
# This will also be applied to other sources, but is not guaranteed to work correctly
[qobuz_filters]
# Remove Collectors Editions, live recordings, etc.
extras = false
# Picks the highest quality out of albums with identical titles.
repeats = false
# Remove EPs and Singles
non_albums = false
# Remove albums whose artist is not the one requested
features = false
# Skip non studio albums
non_studio_albums = false
# Only download remastered albums
non_remaster = false

[artwork]
# Write the image to the audio file
embed = true
# The size of the artwork to embed. Options: thumbnail, small, large, original.
# "original" images can be up to 30MB, and may fail embedding. 
# Using "large" is recommended.
embed_size = "large"
# If this is set to a value > 0, max(width, height) of the embedded art will be set to this value in pixels
# Proportions of the image will remain the same
embed_max_width = -1
# Save the cover image at the highest quality as a seperate jpg file
save_artwork = true
# If this is set to a value > 0, max(width, height) of the saved art will be set to this value in pixels
# Proportions of the image will remain the same
saved_max_width = -1

[metadata]
# Sets the value of the 'ALBUM' field in the metadata to the playlist's name. 
# This is useful if your music library software organizes tracks based on album name.
set_playlist_to_album = true
# If part of a playlist, sets the `tracknumber` field in the metadata to the track's 
# position in the playlist instead of its position in its album
renumber_playlist_tracks = true
# The following metadata tags won't be applied
# See https://github.com/nathom/streamrip/wiki/Metadata-Tag-Names for more info
exclude = []

# Changes the folder and file names generated by streamrip.
[filepaths]
# Create folders for single tracks within the downloads directory using the folder_format
# template
add_singles_to_folder = false
# Available keys: "albumartist", "title", "year", "bit_depth", "sampling_rate",
# "id", and "albumcomposer"
folder_format = "{albumartist} - {title} ({year}) [{container}] [{bit_depth}B-{sampling_rate}kHz]"
# Available keys: "tracknumber", "artist", "albumartist", "composer", "title",
# and "albumcomposer", "explicit"
track_format = "{tracknumber:02}. {artist} - {title}{explicit}"
# Only allow printable ASCII characters in filenames.
restrict_characters = false
# Truncate the filename if it is greater than this number of characters
# Setting this to false may cause downloads to fail on some systems
truncate_to = 120

# Last.fm playlists are downloaded by searching for the titles of the tracks
[lastfm]
# The source on which to search for the tracks.
source = "qobuz"
# If no results were found with the primary source, the item is searched for 
# on this one.
fallback_source = ""

[cli]
# Print "Downloading {Album name}" etc. to screen
text_output = true
# Show resolve, download progress bars
progress_bars = true
# The maximum number of search results to show in the interactive menu
max_search_results = 100

[misc]
# Metadata to identify this config file. Do not change.
version = "2.0.3"
# Print a message if a new version of streamrip is available 
check_for_updates = true

Operating System

Windows 10 Enterprise 22H2

streamrip version

2.0.5

Screenshots and recordings

No response

Additional context

No response

Delivator commented 1 month ago

same issue

Delivator commented 1 month ago

https://github.com/nathom/streamrip/issues/729#issuecomment-2267635638 this seems to fix it for me.

polypores commented 1 month ago

#729 (comment) this seems to fix it for me.

Thank you so much. It worked out.