Skip to content

Commit

Permalink
fix(setup): Use resolve() instead of as_uri() for relative pathing
Browse files Browse the repository at this point in the history
If no `--file` argument is provided to setup, `as_uri()` throws a ValueError when it tries to get the relative path to print to the console. Using `resolve()` will work in both case (`--file` provided or not provided).
  • Loading branch information
apastel authored Dec 22, 2024
1 parent 0042e7d commit c85509b
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()} 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 c85509b

Please sign in to comment.