sigma67 / ytmusicapi

Unofficial API for YouTube Music
https://ytmusicapi.readthedocs.io
MIT License
1.71k stars 194 forks source link

NameError: name 'headers_auth' is not defined #135

Closed bretterballz closed 3 years ago

bretterballz commented 3 years ago

Trying to authenticate requests, but when doing YTMusic.setup(filepath=headers_auth.json) I get Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'headers_auth' is not defined I apologize, I'm a newb and just trying to get https://github.com/KoljaWindeler/ytube_music_player to work. I'm using Python 3.9 (64bit).

Any help to point me in the right direction would be appreciated!

Thanks.

harrytouche commented 3 years ago

It looks to me like you're trying to pass headers_auth.json as a variable. Try wrapping it in some quotes to reference a string, and make sure the file is in your working directory

So YTMusic.setup(filepath=headers_auth.json) Becomes YTMusic.setup(filepath="headers_auth.json")

sigma67 commented 3 years ago

Yes, you need to wrap in quotes since the filepath is provided as a string.

Please use Gitter for further questions if possible: https://gitter.im/sigma67/ytmusicapi/