MarshalX / yandex-music-api

Неофициальная Python библиотека для работы с API сервиса Яндекс.Музыка
https://yandex-music.rtfd.io
GNU Lesser General Public License v3.0
956 stars 81 forks source link

Не работает search() #388

Closed Addic7edBoy closed 3 years ago

Addic7edBoy commented 3 years ago

Опишите ошибку Невозможен поиск.

Воспроизведение Шаги для воспроизведения бага:

  1. Создать объект 'client'
  2. Вызвать метод 'client.search(text='artistName', nocorrect=True, type_='artist')'
  3. Увидеть ошибку

Ожидаемое поведение Должен вернуться объект поиска.

Логи Traceback (most recent call last): File "main.py", line 299, in main() File "main.py", line 214, in main selectExport(imModel, imPhase=parameters.phase, parameters=parameters) File "main.py", line 291, in selectExport status = selectImport(imModel, parameters) File "main.py", line 233, in selectImport imModel.import_artists() File "/mnt/c/dev/MoveMyMusic/yandexmusic.py", line 97, in importartists results = self.client.search(text='Marilyn Manson', type='artist', nocorrect=False) File "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/client.py", line 34, in wrapper result = method(*args, **kwargs) File "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/client.py", line 667, in search return Search.de_json(result, self) File "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/search/search.py", line 89, in de_json data['artists'] = SearchResult.de_json(data.get('artists'), client, 'artist') File "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/search/search_result.py", line 80, in de_json data['results'] = de_jsonresult.get(type)(data.get('results'), client) File "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/artist/artist.py", line 217, in de_list artists.append(cls.de_json(artist, client)) File "/home/max/.pyenv/versions/MMM-3.8.6/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 "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/track/track.py", line 261, in de_list tracks.append(cls.de_json(track, client)) File "/home/max/.pyenv/versions/MMM-3.8.6/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 "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/album/album.py", line 220, in de_list albums.append(cls.de_json(album, client)) File "/home/max/.pyenv/versions/MMM-3.8.6/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 "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/album/label.py", line 69, in de_list labels.append(cls.de_json(label, client)) File "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/album/label.py", line 49, in de_json data = super(Label, cls).de_json(data, client) File "/home/max/.pyenv/versions/MMM-3.8.6/lib/python3.8/site-packages/yandex_music/base.py", line 57, in de_json data = data.copy() AttributeError: 'str' object has no attribute 'copy'

MarshalX commented 3 years ago

Спасибо, ответил тут: https://github.com/MarshalX/yandex-music-api/issues/387