Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'replace' #20

Open
goldyfruit opened this issue Jan 1, 2024 · 0 comments
Open

AttributeError: 'NoneType' object has no attribute 'replace' #20

goldyfruit opened this issue Jan 1, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@goldyfruit
Copy link
Member

Utterance: "when was Stephen Hawking born"

2024-01-01 17:48:09.355 - skills - ovos_workshop.skills.common_query_skill:__get_cq:160 - ERROR - error matching when was Stephen Hawking born with skill-ovos-ddg.openvoiceos
Traceback (most recent call last):
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_workshop/skills/common_query_skill.py", line 158, in __get_cq
    result = self.CQS_match_query_phrase(search_phrase)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_ddg/__init__.py", line 241, in CQS_match_query_phrase
    summary = self.ask_the_duck(utt)
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_ddg/__init__.py", line 258, in ask_the_duck
    self.results = self.duck.long_answer(query, lang=self.lang)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_plugin_manager/templates/solvers.py", line 236, in long_answer
    summary = self.get_spoken_answer(query, context)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_ddg/__init__.py", line 161, in get_spoken_answer
    infobox = self.get_infobox(selected, context)[0] or {}
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_ddg/__init__.py", line 96, in get_infobox
    data = self.extract_and_search(query, context)  # handles translation
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_ddg/__init__.py", line 110, in extract_and_search
    query, context, lang = self._tx_query(query, context)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_plugin_manager/templates/solvers.py", line 93, in _tx_query
    query = query.replace("who is is ", "who is ")
            ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'
@JarbasAl JarbasAl added the bug Something isn't working label Jan 2, 2024
@JarbasAl JarbasAl self-assigned this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants