OpenVoiceOS / skill-ovos-spotify

3 stars 2 forks source link

NameError: name 'process' is not defined #2

Closed goldyfruit closed 2 months ago

goldyfruit commented 9 months ago

https://github.com/OpenVoiceOS/skill-ovos-spotify/blob/master/skill_spotify/__init__.py#L22 should import process as well.

Dec 11 20:43:48 stronghold ovos-core[344175]: Traceback (most recent call last):
Dec 11 20:43:48 stronghold ovos-core[344175]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/ovos_utils/messagebus.py", line 601, in wrapper
Dec 11 20:43:48 stronghold ovos-core[344175]:     handler(message)
Dec 11 20:43:48 stronghold ovos-core[344175]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/ovos_workshop/skills/common_play.py", line 280, in __handle_ocp_query
Dec 11 20:43:48 stronghold ovos-core[344175]:     results = handler(search_phrase, media_type) or []
Dec 11 20:43:48 stronghold ovos-core[344175]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:43:48 stronghold ovos-core[344175]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/skill_spotify/__init__.py", line 302, in match_query_phrase
Dec 11 20:43:48 stronghold ovos-core[344175]:     confidence, data = self.generic_query(phrase, bonus)
Dec 11 20:43:48 stronghold ovos-core[344175]:                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:43:48 stronghold ovos-core[344175]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/skill_spotify/__init__.py", line 425, in generic_query
Dec 11 20:43:48 stronghold ovos-core[344175]:     playlist, conf = self.get_best_user_playlist(phrase)
Dec 11 20:43:48 stronghold ovos-core[344175]:                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:43:48 stronghold ovos-core[344175]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/skill_spotify/__init__.py", line 754, in get_best_user_playlist
Dec 11 20:43:48 stronghold ovos-core[344175]:     key, confidence = match_one(playlist.lower(), playlists)
Dec 11 20:43:48 stronghold ovos-core[344175]:                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:43:48 stronghold ovos-core[344175]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/skill_spotify/__init__.py", line 99, in match_one
Dec 11 20:43:48 stronghold ovos-core[344175]:     selected = process.extractOne(query, choices, fuzz.WRatio)
Dec 11 20:43:48 stronghold ovos-core[344175]:                ^^^^^^^
Dec 11 20:43:48 stronghold ovos-core[344175]: NameError: name 'process' is not defined
forslund commented 9 months ago

Thanks, have fixed this now (hopefully)