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

search fails with 'list index out of range' #121

Closed
chaos87 opened this issue Dec 16, 2020 · 1 comment
Closed

search fails with 'list index out of range' #121

chaos87 opened this issue Dec 16, 2020 · 1 comment
Labels
bug Something isn't working yt-update A server-side change caused this issue

Comments

@chaos87
Copy link

chaos87 commented Dec 16, 2020

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-2-228b7e527447> in <module>()
      1 query = "smashing pumpkins"
----> 2 results = ytmusic.search(query)

/usr/local/lib/python3.6/dist-packages/ytmusicapi/parsers/utils.py in get_flex_column_item(item, index)
     34 
     35 def get_flex_column_item(item, index):
---> 36     if 'text' not in item['flexColumns'][index]['musicResponsiveListItemFlexColumnRenderer'] or \
     37             'runs' not in item['flexColumns'][index]['musicResponsiveListItemFlexColumnRenderer']['text']:
     38         return None

IndexError: list index out of range

Tried different queries and also tried with both 0.10.2 and 0.11.0 versions

@chaos87 chaos87 changed the title search returns 'list index out of range' search fails with 'list index out of range' Dec 16, 2020
@sigma67 sigma67 added bug Something isn't working yt-update A server-side change caused this issue labels Dec 16, 2020
@sigma67
Copy link
Owner

sigma67 commented Dec 16, 2020

Seems YouTube changed something, as it was working just yesterday. I'll push a fix today.

Edit: This seems like a totally arbitrary data structure change. Kind of surprised to see this, not sure what the purpose is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working yt-update A server-side change caused this issue
Projects
None yet
Development

No branches or pull requests

2 participants