Search code examples
pythonpython-3.xattributeerror

YTMUSIC ERROR: 'YTMusic' object has no attribute 'parser'


I've a problem with ytmusicapi. I used it for some tests and was all ok, but now when I search for a song I get this error: 'YTMusic' object has no attribute 'parser'. Here is a test:

from ytmusicapi import YTMusic

ytmusic = YTMusic()

ric = ytmusic.search("fix you coldplay")
print(ric)


I tried to analyze the script and I created an isoleted one but nothing. Can you help me?


Solution

  • You are probably using an older version of ytmusicapi. Just update it with pip install -U ytmusicapi and it will work. I tested it on my machine and it works