Skip to content

Commit

Permalink
fix(setup): Use resolve() before invoking as_uri() (#700)
Browse files Browse the repository at this point in the history
If a relative file path is provided, `as_uri()` throws a ValueError.
Resolve the path to be absolute before converting to URI.
  • Loading branch information
apastel authored Dec 27, 2024
1 parent 0042e7d commit 4081404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ytmusicapi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def parse_args(args):
def main() -> Union[RefreshingToken, str]:
args = parse_args(sys.argv[1:])
filename = args.file.as_posix() if args.file else f"{args.setup_type}.json"
print(f"Creating {Path(filename).as_uri()} with your authentication credentials...")
print(f"Creating {Path(filename).resolve().as_uri()} with your authentication credentials...")
if args.setup_type == "oauth":
if args.client_id is None:
args.client_id = input("Enter your Google Youtube Data API client ID: ")
Expand Down

0 comments on commit 4081404

Please sign in to comment.