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

json.decoder.JSONDecodeError: Extra data: line 1 column 256 (char 255) #7

Closed
goldyfruit opened this issue Oct 30, 2021 · 2 comments
Closed

Comments

@goldyfruit
Copy link
Member

When installing this skill on a fresh Mycroft instance (dev) I got this Python trace:

2021-10-29 22:34:59,876 INFO QuestionsAnswersSkill Answer from mycroft-fallback-duck-duck-go.mycroftai
2021-10-29 22:35:00,560 ERROR mycroft.skills.mycroft_skill.mycroft_skill:on_error:923 An error occurred while processing a request in Wolfram Alpha Skill
Traceback (most recent call last):
  File "/home/mycroft/core/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper
    handler(message)
  File "/home/mycroft/core/mycroft/skills/common_query_skill.py", line 111, in __handle_question_query
    result = self.CQS_match_query_phrase(search_phrase)
  File "/opt/mycroft/skills/skill-wolfie.jarbasskills/__init__.py", line 116, in CQS_match_query_phrase
    response = self.ask_the_wolf(utt)
  File "/opt/mycroft/skills/skill-wolfie.jarbasskills/__init__.py", line 123, in ask_the_wolf
    utt = self.translate(query, "en", self.lang)
  File "/opt/mycroft/skills/skill-wolfie.jarbasskills/__init__.py", line 96, in translate
    lang_src=lang_src).strip()
  File "/opt/mycroft-venv/lib/python3.7/site-packages/google_trans_new/google_trans_new.py", line 188, in translate
    raise e
  File "/opt/mycroft-venv/lib/python3.7/site-packages/google_trans_new/google_trans_new.py", line 152, in translate
    response = json.loads(response)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 256 (char 255)
2021-10-29 22:35:00,577 ERROR mycroft.skills.mycroft_skill.mycroft_skill:on_error:923 An error occurred while processing a request in Duck Duck Go Skill
Traceback (most recent call last):
  File "/home/mycroft/core/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper
    handler(message)
  File "/home/mycroft/core/mycroft/skills/common_query_skill.py", line 111, in __handle_question_query
    result = self.CQS_match_query_phrase(search_phrase)
  File "/opt/mycroft/skills/skill-ddg.jarbasskills/__init__.py", line 177, in CQS_match_query_phrase
    answer, match, data = self.parse_subintents(utt)
  File "/opt/mycroft/skills/skill-ddg.jarbasskills/__init__.py", line 154, in parse_subintents
    summary = self.ask_the_duck(query)
  File "/opt/mycroft/skills/skill-ddg.jarbasskills/__init__.py", line 209, in ask_the_duck
    utt = self.translate(query, "en", self.lang)
  File "/opt/mycroft/skills/skill-ddg.jarbasskills/__init__.py", line 291, in translate
    lang_src=lang_src).strip()
  File "/opt/mycroft-venv/lib/python3.7/site-packages/google_trans_new/google_trans_new.py", line 188, in translate
    raise e
  File "/opt/mycroft-venv/lib/python3.7/site-packages/google_trans_new/google_trans_new.py", line 152, in translate
    response = json.loads(response)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 242 (char 241)
@JarbasAl
Copy link
Member

JarbasAl commented Oct 30, 2021

thanks for flagging, the google translate package broke again, will switch to a different dependency, i have been doing this in several places already but missed the ddg and wolfram alpha skills

@JarbasAl
Copy link
Member

JarbasAl commented Jun 1, 2022

this was fixed in dev branch already, but closing as there has been a full rewrite meanwhile and it no longer applies

@JarbasAl JarbasAl closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants