Picroft An error occurred while processing a request in Mozilla Iot Gateway

Hello I am new to mycroft and am enjoying it but I am not sure what is wrong with the webthings skill. I am able to control the hue when I am in the webthings gateway page, but I get the error “An error occurred while processing a request in Mozilla Iot Gateway” even after rebooting both the webthings (in docker container) and the entire raspberry pi/picroft. I did the auto setup and the skill says it worked and I see the authorization token for the pi in webthings.

Here are the relevant logs for the picroft skill.log:
2020-06-23 18:45:18.230 | INFO | 720 | mycroft.skills.skill_updater:_log_next_download_time:248 | Next scheduled skill update: 2020-06-23 19:45:18.223656
2020-06-23 18:45:18.236 | INFO | 720 | mycroft.skills.skill_updater:update_skills:163 | Skill update complete
2020-06-23 18:45:26.934 | ERROR | 720 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:835 | An error occurred while processing a request in Mozilla Iot Gateway
Traceback (most recent call last):
File “/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py”, line 66, in wrapper
handler(message)
File “/opt/mycroft/skills/mozilla-webthings-gateway-skill.mozilla-iot/init.py”, line 71, in handle_command_intent
data = response.json()
File “/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/models.py”, line 897, in json
return complexjson.loads(self.text, **kwargs)
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 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2020-06-23 18:55:04.495 | INFO | 720 | mycroft.skills.settings:_emit_settings_change_events:411 | Emitting skill.settings.change event for skill dismissal-skill|20.02
2020-06-23 18:55:04.500 | INFO | 720 | mycroft.skills.settings:_emit_settings_change_events:411 | Emitting skill.settings.change event for skill telegram|20.02
2020-06-23 18:55:04.506 | INFO | 720 | mycroft.skills.settings:_emit_settings_change_events:411 | Emitting skill.settings.change event for skill laugh
2020-06-23 18:55:07.563 | INFO | 720 | mycroft.skills.mycroft_skill.mycroft_skill:handle_settings_change:308 | Updating settings for skill DismissalSkill
2020-06-23 18:55:07.730 | INFO | 720 | mycroft.skills.settings:save_settings:111 | Skill settings successfully saved to /home/pi/.config/mycroft/skills/dismissal-skill.chancencounter/settings.json
2020-06-23 18:55:08.715 | INFO | 720 | mycroft.skills.mycroft_skill.mycroft_skill:handle_settings_change:308 | Updating settings for skill LaughSkill
2020-06-23 18:55:08.792 | INFO | 720 | mycroft.skills.settings:save_settings:111 | Skill settings successfully saved to /home/pi/.config/mycroft/skills/laugh.jarbasal/settings.json
2020-06-23 18:55:08.927 | INFO | 720 | mycroft.skills.mycroft_skill.mycroft_skill:handle_settings_change:308 | Updating settings for skill TelegramSkill
2020-06-23 18:55:08.937 | INFO | 720 | mycroft.skills.settings:save_settings:111 | Skill settings successfully saved to /home/pi/.config/mycroft/skills/telegram.luke5sky/settings.json
2020-06-23 18:55:55.316 | ERROR | 720 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:835 | An error occurred while processing a request in Mozilla Iot Gateway
Traceback (most recent call last):
File “/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py”, line 66, in wrapper
handler(message)
File “/opt/mycroft/skills/mozilla-webthings-gateway-skill.mozilla-iot/init.py”, line 71, in handle_command_intent
data = response.json()
File “/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/models.py”, line 897, in json
return complexjson.loads(self.text, **kwargs)
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 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2020-06-23 19:00:19.921 | ERROR | 720 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:835 | An error occurred while processing a request in Mozilla Iot Gateway
Traceback (most recent call last):
File “/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py”, line 66, in wrapper
handler(message)
File “/opt/mycroft/skills/mozilla-webthings-gateway-skill.mozilla-iot/init.py”, line 71, in handle_command_intent
data = response.json()
File “/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/models.py”, line 897, in json
return complexjson.loads(self.text, **kwargs)
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 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The logs for the webthings only have status updates let me know if you want those as well.

Thank you!

Update
So I uninstalled the webthings gateway and tried to reinstall it but it is saying its not found when using msm command line and with voice. I think the first time I installed it I pulled it down from github. Does webthings gateway not work with picroft even though it says it does on the skill page?

You’d probably have to use git to pull it down again if that’s how you did it the first time and it doesn’t install via msm or voice request.

The jsondecode error sounds like there’s a misconfiguration of something.

Does the skill settings page auto configure not work?

Hey Snukkums,

The way they built the Skill forwarded all intent parsing to the Mozilla Webthings Gateway however they removed the intent parsing module in v0.12.0 so any Gateway running v0.12.x or higher won’t run properly.

I thought we’d removed the Skill from the Marketplace so will look into that and get it taken down.

There are some community members looking at building a new Skill that uses Mycroft’s intent parsing and interacts with the new Webthings API, but it’s not ready yet. If you’re interested in helping out let us know and I can connect you.

I would be willing to test it out for sure. I am limited on my programming ability and haven’t built a skill yet so I don’t know how helpful I would be other than testing it.

Thank you for your response as well!

I am interested in connecting with community members building a new skill for Webthings API.

1 Like

Hey there, welcome to Mycroft!

We’ve had another community member James start to tackle this too. Not sure that he’s on the Forums but you can find the Skill at:

To test it out, you will need to first install the IoT Control Skill:

mycroft-msm install https://github.com/MycroftAI/skill-iot-control

This requires Python3.6+