Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

KeyError: 'type' when saving or loading brain #25

Open
krisgesling opened this issue Jun 20, 2019 · 3 comments
Open

KeyError: 'type' when saving or loading brain #25

krisgesling opened this issue Jun 20, 2019 · 3 comments

Comments

@krisgesling
Copy link

A user is reporting that they were getting an error using this Skill. Looking at their logs shows these errors of interest:

Saving brain to /home/user/.mycroft/skills/AimlFallback/bot_brain.brn...done (0.08 seconds)
12:40:09.888 - mycroft.skills.core:handler:1762 - ERROR - Exception in fallback.
Traceback (most recent call last):
  File "/home/user/mycroft-core/mycroft/skills/core.py", line 1753, in handler
    if handler(message):
  File "/home/user/mycroft-core/mycroft/skills/core.py", line 1802, in wrapper
    if handler(*args, **kwargs):
  File "/opt/mycroft/skills/fallback-aiml.forslund/__init__.py", line 111, in handle_fallback
    self.load_brain()
  File "/opt/mycroft/skills/fallback-aiml.forslund/__init__.py", line 67, in load_brain
    self.kernel.setBotPredicate("species", device["type"])
KeyError: 'type'
12:40:24.138 - fallback-aiml_forslund:load_brain:51 - INFO - Loading Brain
Loading brain from /home/user/.mycroft/skills/AimlFallback/bot_brain.brn...done (56136 categories in 1.55 seconds)
Kernel bootstrap completed in 1.55 seconds
12:40:26.044 - mycroft.skills.core:handler:1762 - ERROR - Exception in fallback.
Traceback (most recent call last):
  File "/home/user/mycroft-core/mycroft/skills/core.py", line 1753, in handler
    if handler(message):
  File "/home/user/mycroft-core/mycroft/skills/core.py", line 1802, in wrapper
    if handler(*args, **kwargs):
  File "/opt/mycroft/skills/fallback-aiml.forslund/__init__.py", line 111, in handle_fallback
    self.load_brain()
  File "/opt/mycroft/skills/fallback-aiml.forslund/__init__.py", line 67, in load_brain
    self.kernel.setBotPredicate("species", device["type"])
KeyError: 'type'

Prior to each instance of the error I noticed:
12:39:58.621 - mycroft.util:find_input_device:222 - INFO - Searching for input device: HD-Audio Generic: ALC887-VD Alt Analog (hw:1,2)

I'm assuming the device referenced above is the input device?
So it would seem that the Skill isn't finding this device despite Mycroft having registered it and is using it?

Any ideas?

@forslund
Copy link
Owner

It has nothing to do with the audio, type was previously device type of the install, picroft, mark-1, unknown...as reported by the backend. the type key seems to be missing now since we switched servers. WIll push a fix for this.

@krisgesling
Copy link
Author

Awesome, thanks!

@forslund
Copy link
Owner

Should be fixed now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants