OpenVoiceOS / ovos-skill-spotify

3 stars 2 forks source link

TypeError: extractOne() takes exactly 2 positional arguments (3 given) #3

Closed goldyfruit closed 3 months ago

goldyfruit commented 11 months ago

https://maxbachmann.github.io/RapidFuzz/Usage/process.html#extractone only takes two arguments, fuzz.WRatio should be removed I guess.

Dec 11 20:49:09 stronghold ovos-core[345520]: 2023-12-11 20:49:09.756 - skill-spotify.forslund - ERROR - extractOne() takes exactly 2 positional arguments (3 given)
Dec 11 20:49:09 stronghold ovos-core[345520]: Traceback (most recent call last):
Dec 11 20:49:09 stronghold ovos-core[345520]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/ovos_utils/messagebus.py", line 601, in wrapper
Dec 11 20:49:09 stronghold ovos-core[345520]:     handler(message)
Dec 11 20:49:09 stronghold ovos-core[345520]:   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:49:09 stronghold ovos-core[345520]:     results = handler(search_phrase, media_type) or []
Dec 11 20:49:09 stronghold ovos-core[345520]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:49:09 stronghold ovos-core[345520]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/skill_spotify/__init__.py", line 302, in match_query_phrase
Dec 11 20:49:09 stronghold ovos-core[345520]:     confidence, data = self.generic_query(phrase, bonus)
Dec 11 20:49:09 stronghold ovos-core[345520]:                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:49:09 stronghold ovos-core[345520]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/skill_spotify/__init__.py", line 425, in generic_query
Dec 11 20:49:09 stronghold ovos-core[345520]:     playlist, conf = self.get_best_user_playlist(phrase)
Dec 11 20:49:09 stronghold ovos-core[345520]:                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:49:09 stronghold ovos-core[345520]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/skill_spotify/__init__.py", line 754, in get_best_user_playlist
Dec 11 20:49:09 stronghold ovos-core[345520]:     key, confidence = match_one(playlist.lower(), playlists)
Dec 11 20:49:09 stronghold ovos-core[345520]:                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:49:09 stronghold ovos-core[345520]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.11/site-packages/skill_spotify/__init__.py", line 99, in match_one
Dec 11 20:49:09 stronghold ovos-core[345520]:     selected = process.extractOne(query, choices, fuzz.WRatio)
Dec 11 20:49:09 stronghold ovos-core[345520]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 11 20:49:09 stronghold ovos-core[345520]:   File "src/rapidfuzz/process_cpp_impl.pyx", line 656, in rapidfuzz.process_cpp_impl.extractOne
Dec 11 20:49:09 stronghold ovos-core[345520]: TypeError: extractOne() takes exactly 2 positional arguments (3 given)
forslund commented 11 months ago

Thanks for reportiong, the third argument has been removed.