Closed barrou19 closed 1 year ago
Добрый день. Очевидно, что плагин не может найти у вас библиотеку yandex_music. Попробуйте переустановить её:
$ pip install yandex-music --upgrade
Здравствуйте,
спасибо что оперативно ответили :) Да, действительно, очевидно, что плагин не может найти библиотеку. Переустановка библиотеки - это первое, что я попытался сделать. После этого я пробовал удалять плагин, устанавливать его снова, как релизную версию, так и тестовую. Но ничего не помогло. Может быть, у Вас будут ещё идеи, куда копать, смотреть и что пробовать?
Вывод предложенной вами команды ниже:
`pip install yandex-music --upgrade
Requirement already satisfied: yandex-music in ./anaconda3/lib/python3.9/site-packages (2.0.1)
Requirement already satisfied: requests[socks] in ./anaconda3/lib/python3.9/site-packages (from yandex-music) (2.28.1)
Requirement already satisfied: aiohttp in ./anaconda3/lib/python3.9/site-packages (from yandex-music) (3.8.1)
Requirement already satisfied: aiofiles in ./anaconda3/lib/python3.9/site-packages (from yandex-music) (22.1.0)
Requirement already satisfied: attrs>=17.3.0 in ./anaconda3/lib/python3.9/site-packages (from aiohttp->yandex-music) (21.4.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in ./anaconda3/lib/python3.9/site-packages (from aiohttp->yandex-music) (4.0.1)
Requirement already satisfied: multidict<7.0,>=4.5 in ./anaconda3/lib/python3.9/site-packages (from aiohttp->yandex-music) (5.2.0)
Requirement already satisfied: aiosignal>=1.1.2 in ./anaconda3/lib/python3.9/site-packages (from aiohttp->yandex-music) (1.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in ./anaconda3/lib/python3.9/site-packages (from aiohttp->yandex-music) (1.2.0)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in ./anaconda3/lib/python3.9/site-packages (from aiohttp->yandex-music) (2.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in ./anaconda3/lib/python3.9/site-packages (from aiohttp->yandex-music) (1.8.1)
Requirement already satisfied: idna<4,>=2.5 in ./anaconda3/lib/python3.9/site-packages (from requests[socks]->yandex-music) (3.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./anaconda3/lib/python3.9/site-packages (from requests[socks]->yandex-music) (1.26.11)
Requirement already satisfied: certifi>=2017.4.17 in ./anaconda3/lib/python3.9/site-packages (from requests[socks]->yandex-music) (2022.6.15)
Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in ./anaconda3/lib/python3.9/site-packages (from requests[socks]->yandex-music) (1.7.1)
Requirement already satisfied: typing-extensions>=3.6.5 in ./anaconda3/lib/python3.9/site-packages (from async-timeout<5.0,>=4.0.0a3->aiohttp->yandex-music) (4.3.0) `
Разобрался в чём проблема. Конечно, она была не в плагине или библиотеке, а в бардаке с версиями python на моём компьютере.
Причина проблемы:
при запуске
pip install yandex-music --upgrade
библиотека устанавливалась для python версии 3.9, а rythmbox использовал версию 3.10. Видимо, rythmbox (или вся Ubuntu) после обновления перешёл на 3.10.
Решение: установить библиотеку явно для версии 3.10. Команду для установки использовал такую:
python3.10 -m pip install yandex-music --upgrade
p.s. Сказался дефицит моих знаний по управлению и использованию разных версий pytthon на одном PC, чтобы не допускать такого бардака с ними, как сейчас.
После обновления Ubuntu c 22.04 до 22.04.1 плагин перестал загружаться. Вывод rhytmbox -D yandex-music (ниже) наводит на мысль, что API не утсановлено. Но при попытке переустановить API Яндекс-музыки pip пишет, что все нужные пакеты уже установлены.
Вывод команды $ rhythmbox -D yandex-music:
(rhythmbox:134324): Gtk-WARNING **: 09:57:40.691: actionhelper: action app.play-repeat can't be activated due to parameter type mismatch (parameter type b, target type NULL)
(rhythmbox:134324): Gtk-WARNING **: 09:57:40.691: actionhelper: action app.play-shuffle can't be activated due to parameter type mismatch (parameter type b, target type NULL)
(rhythmbox:134324): WARNING : 09:57:40.785: Error importing plugin 'yandex-music': Traceback (most recent call last): File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/barrou/.local/share/rhythmbox/plugins/rhythmbox-plugin-yandex-music-0.4-alpha/yandex-music.py", line 2, in
from yandex_music import Client
ModuleNotFoundError: No module named 'yandex_music'
(rhythmbox:134324): libpeas-WARNING : 09:57:40.785: Error loading plugin 'yandex-music' /usr/lib/python3/dist-packages/gi/overrides/GObject.py:493: Warning: ../../../gobject/gsignal.c:2731: instance '0x55b36331d300' has no handler with id '14581' return func(*args, *kwargs) /usr/lib/python3/dist-packages/gi/overrides/GObject.py:493: Warning: ../../../gobject/gsignal.c:2731: instance '0x55b36331d300' has no handler with id '14580' return func(args, kwargs)
(rhythmbox:134324): Gtk-WARNING **: 09:57:43.625: Can't set a parent on widget which has a parent