OpenVoiceOS / ovos-skill-ddg

duck duck go skill
Apache License 2.0
3 stars 4 forks source link

AttributeError: 'NoneType' object has no attribute 'get' #26

Closed goldyfruit closed 6 months ago

goldyfruit commented 6 months ago
May 29 11:06:04 mark2 ovos-core[931]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_workshop/skills/common_query_skill.py", line 168, in __get_cq
May 29 11:06:04 mark2 ovos-core[931]:     result = self.CQS_match_query_phrase(search_phrase)
May 29 11:06:04 mark2 ovos-core[931]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 29 11:06:04 mark2 ovos-core[931]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/skill_ovos_ddg/__init__.py", line 304, in CQS_match_query_phrase
May 29 11:06:04 mark2 ovos-core[931]:     summary = self.ask_the_duck(sess)
May 29 11:06:04 mark2 ovos-core[931]:               ^^^^^^^^^^^^^^^^^^^^^^^
May 29 11:06:04 mark2 ovos-core[931]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/skill_ovos_ddg/__init__.py", line 328, in ask_the_duck
May 29 11:06:04 mark2 ovos-core[931]:     results = self.duck.long_answer(query, context={"lang": sess.lang,
May 29 11:06:04 mark2 ovos-core[931]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 29 11:06:04 mark2 ovos-core[931]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/ovos_plugin_manager/templates/solvers.py", line 256, in long_answer
May 29 11:06:04 mark2 ovos-core[931]:     steps = self.get_expanded_answer(query, context)
May 29 11:06:04 mark2 ovos-core[931]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 29 11:06:04 mark2 ovos-core[931]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/skill_ovos_ddg/__init__.py", line 234, in get_expanded_answer
May 29 11:06:04 mark2 ovos-core[931]:     infobox, _ = self.get_infobox(query)
May 29 11:06:04 mark2 ovos-core[931]:                  ^^^^^^^^^^^^^^^^^^^^^^^
May 29 11:06:04 mark2 ovos-core[931]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/skill_ovos_ddg/__init__.py", line 128, in get_infobox
May 29 11:06:04 mark2 ovos-core[931]:     data = self.extract_and_search(query, context)  # handles translation
May 29 11:06:04 mark2 ovos-core[931]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 29 11:06:04 mark2 ovos-core[931]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.12/site-packages/skill_ovos_ddg/__init__.py", line 156, in extract_and_search
May 29 11:06:04 mark2 ovos-core[931]:     lang = context.get("lang", "en-us")
May 29 11:06:04 mark2 ovos-core[931]:            ^^^^^^^^^^^
May 29 11:06:04 mark2 ovos-core[931]: AttributeError: 'NoneType' object has no attribute 'get'