You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Опишите ошибку
При попытке вызвать метод Client.search() вылетает исключение типа AttributeError
Воспроизведение
создать объект типа Client
вызвать метод search с произвольным содержимым
Ожидаемое поведение
Вызов метода должен возвращять структуру Search
Логи
Python 3.8.2 (default, Nov 4 2020, 21:23:28)
[Clang 12.0.0 (clang-1200.0.32.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from yandex_music import Client
>>> client = Client.from_token('====')
Found unknown fields received from API! Please copy warn message and send to https://bit.ly/3dsFxyH (github issue), thank you!
Type: <class 'yandex_music.account.product.Product'>; kwargs: {'trial_period_duration': 'P3M', 'plus': True}
Found unknown fields received from API! Please copy warn message and send to https://bit.ly/3dsFxyH (github issue), thank you!
Type: <class 'yandex_music.account.subscription.Subscription'>; kwargs: {'non_auto_renewable_remainder': {'days': 0}}
Found unknown fields received from API! Please copy warn message and send to https://bit.ly/3dsFxyH (github issue), thank you!
Type: <class 'yandex_music.account.status.Status'>; kwargs: {'advertisement': 'Оформите постоянную подписку – первый месяц бесплатно!'}
>>> client.search('whatever')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/client.py", line 34, in wrapper
result = method(*args, **kwargs)
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/client.py", line 667, in search
return Search.de_json(result, self)
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/search/search.py", line 87, in de_json
data['best'] = Best.de_json(data.get('best'), client)
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/search/best.py", line 68, in de_json
data['result'] = de_json_result.get(data.get('type_'))(data.get('result'), client)
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/artist/artist.py", line 195, in de_json
data['popular_tracks'] = Track.de_list(data.get('popular_tracks'), client)
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/track/track.py", line 261, in de_list
tracks.append(cls.de_json(track, client))
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/track/track.py", line 238, in de_json
data['albums'] = Album.de_list(data.get('albums'), client)
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/album/album.py", line 220, in de_list
albums.append(cls.de_json(album, client))
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/album/album.py", line 197, in de_json
data['labels'] = Label.de_list(data.get('labels'), client)
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/album/label.py", line 69, in de_list
labels.append(cls.de_json(label, client))
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/album/label.py", line 49, in de_json
data = super(Label, cls).de_json(data, client)
File "/Users/mikhail.pokhikhilov/proj/kodi.plugin.yandex-music/.venv/lib/python3.8/site-packages/yandex_music/base.py", line 57, in de_json
data = data.copy()
AttributeError: 'str' object has no attribute 'copy'
Дополнительная информация
yandex-music==0.1.2
Похоже, что поменялся формал структуры 'label', который приходят в ответе на запрос. Раньше, видимо, ожидался следующий формат:
{
"id": int,
"name": str
}
Сейчас приходит просто строка. Например
'labels': ['NoiseArt']
The text was updated successfully, but these errors were encountered:
Опишите ошибку
При попытке вызвать метод
Client.search()
вылетает исключение типаAttributeError
Воспроизведение
Ожидаемое поведение
Вызов метода должен возвращять структуру
Search
Логи
Дополнительная информация
Похоже, что поменялся формал структуры 'label', который приходят в ответе на запрос. Раньше, видимо, ожидался следующий формат:
Сейчас приходит просто строка. Например
The text was updated successfully, but these errors were encountered: