-
Notifications
You must be signed in to change notification settings - Fork 25
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
TypeError: list indices must be integers or slices, not str #35
Comments
Hi, |
Can you implement it so that the return code for not finding lyrics is different than the return code for this error? |
@jagauthier You can somehow grab all the info with the logs (-v or setting level to debug), but in case of API error, it checks the next providers so you would not get a limit most likely. Why would you wait for API limits when there are other providers? |
Maybe I am using it wrong, but in my code:
where It only ever uses MusixMatch. I've never got a lyric hit from one of the other providers.
I get no lyrical hits.
|
Hello,
While running a loop with syncedlyrics.search(), I sometimes face the following issue:
lrc = syncedlyrics.search("Synthetic Dream lextrical", allow_plain_format=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/anaconda3/lib/python3.11/site-packages/syncedlyrics/__init__.py", line 59, in search
_l = provider.get_lrc(search_term)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/anaconda3/lib/python3.11/site-packages/syncedlyrics/providers/musixmatch.py", line 120, in get_lrc
tracks = body["track_list"]
~~~~^^^^^^^^^^^^^^
TypeError: list indices must be integers or slices, not str
my code:
What partially helped me was
time.sleep(180)
after each error and retrying the same values before skipping, yet it does not always work.The text was updated successfully, but these errors were encountered: