Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix qobuz.py [BUG FIXED] "X not in list" #772

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

CevreMuhendisi
Copy link

[BUG FIXED] "X not in list"

[BUG FIXED] "X not in list"
@CevreMuhendisi CevreMuhendisi changed the title Fix qobuz.py Fix qobuz.py [BUG FIXED] "X not in list" Nov 11, 2024
@mythillogical
Copy link

I'm getting the same error

Enter your Qobuz password (invisible):
Credentials saved to config file at /home/bfs/.config/streamrip/config.toml
[01:49:00] INFO     App id/secrets not found, fetching                                                      qobuz.py:157
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /mnt/f/venv/bin/rip:8 in <module>                                                                │
│                                                                                                  │
│   5 from streamrip.rip import rip                                                                │
│   6 if __name__ == '__main__':                                                                   │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                         │
│ ❱ 8 │   sys.exit(rip())                                                                          │
│   9                                                                                              │
│                                                                                                  │
│ /mnt/f/venv/lib/python3.12/site-packages/click/core.py:1157 in __call__                          │
│                                                                                                  │
│                                     ... 14 frames hidden ...                                     │
│                                                                                                  │
│ /mnt/f/venv/lib/python3.12/site-packages/streamrip/client/qobuz.py:382 in                        │
│ _get_app_id_and_secrets                                                                          │
│                                                                                                  │
│   379 │                                                                                          │
│   380 │   async def _get_app_id_and_secrets(self) -> tuple[str, list[str]]:                      │
│   381 │   │   async with QobuzSpoofer() as spoofer:                                              │
│ ❱ 382 │   │   │   return await spoofer.get_app_id_and_secrets()                                  │
│   383 │                                                                                          │
│   384 │   async def _get_valid_secret(self, secrets: list[str]) -> str:                          │
│   385 │   │   results = await asyncio.gather(                                                    │
│                                                                                                  │
│ /mnt/f/venv/lib/python3.12/site-packages/streamrip/client/qobuz.py:120 in get_app_id_and_secrets │
│                                                                                                  │
│   117 │   │   │   ).decode("utf-8")                                                              │
│   118 │   │                                                                                      │
│   119 │   │   vals: List[str] = list(secrets.values())                                           │
│ ❱ 120 │   │   vals.remove("")                                                                    │
│   121 │   │                                                                                      │
│   122 │   │   secrets_list = vals                                                                │
│   123                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: list.remove(x): x not in list

@CevreMuhendisi
Copy link
Author

@mcodepreneur Could you try writing the user ID and token into an empty config file and testing again? It's working fine on my end

@t-p-3
Copy link

t-p-3 commented Nov 19, 2024

@CevreMuhendisi I know I'm not @mcodepreneur, but I tried your suggestion of writing the user ID and token into an empty config (by which I assume you mean an unedited config such as after running 'rip config reset'). I still receive the same error:

image

The only part of the config I changed is highlighted in yellow:

image

Thank you in advance for any help you can offer! And, of course, please let me know if I can provide any more info!

@mythillogical
Copy link

Qobuz site is down?

@t-p-3
Copy link

t-p-3 commented Nov 19, 2024

@mcodepreneur It doesn't appear down for me. I can still get to the www frontend and can still seemingly download from the streaming servers via other tooling:

image

@yoyo292949158
Copy link

Thanks for this fix. It corrected the "X not in list" error for me.

@CevreMuhendisi
Copy link
Author

FIXED] "X not in

I'm glad I could help

@t-p-3
Copy link

t-p-3 commented Nov 25, 2024

@CevreMuhendisi - Seeing @yoyo292949158's comment makes me feel like I missed something in my testing up-thread. I see the submitted file with the proposed change, which I used to manually replaced the existing file in my streamrip install before testing. Is there more I should be doing to test this? Or have I gone down the correct path?

return resp

async def get_label(self, label_id: str) -> dict:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is all this code removed? Does it cause the X not in list bug?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants