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

1.9.0: ytmusicapi oauth results in "ValueError: relative path can't be expressed as a file URI" #699

Closed
sandrotosi opened this issue Dec 22, 2024 · 0 comments · Fixed by #700

Comments

@sandrotosi
Copy link

sandrotosi commented Dec 22, 2024

Describe the bug

$ ytmusicapi oauth
Traceback (most recent call last):
  File "venv/bin/ytmusicapi", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "venv/lib/python3.11/site-packages/ytmusicapi/setup.py", line 78, in main
    print(f"Creating {Path(filename).as_uri()} with your authentication credentials...")
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/pathlib.py", line 567, in as_uri
    raise ValueError("relative path can't be expressed as a file URI")
ValueError: relative path can't be expressed as a file URI

To Reproduce

run the code above in python3.11 or a small reproducer:

>>> from pathlib import Path
>>> Path('oauth.json').as_uri()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.11/pathlib.py", line 567, in as_uri
    raise ValueError("relative path can't be expressed as a file URI")
ValueError: relative path can't be expressed as a file URI

which is what's done in https://github.com/sigma67/ytmusicapi/blob/main/ytmusicapi/setup.py#L77-L78

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

Successfully merging a pull request may close this issue.

1 participant