pcwii / cpkodi-skill

updated Mycroft.AI Kodi Skill using the Common Play Framework
GNU General Public License v3.0
14 stars 6 forks source link

Fails to load freshly installed on x86_64 #21

Closed david-morris closed 3 years ago

david-morris commented 3 years ago

I'm running Arch on a halftop, and I've been having this issue trying to install:

 14:59:12.773 | INFO     |  5873 | cpkodi-skill_pcwii:<module>:35 | Attempting to reload tools Modules: cpkodi-skill_pcwii.youtube_tools
 14:59:12.774 | ERROR    |  5873 | mycroft.skills.skill_loader:_load_skill_source:278 | Failed to load skill: cpkodi-skill.pcwii (RuntimeError('dictionary keys changed during iteration'))
Traceback (most recent call last):
  File "/home/dmorris/src/mycroft-core/mycroft/skills/skill_loader.py", line 276, in _load_skill_source
    skill_module = load_skill_module(main_file_path, self.skill_id)
  File "/home/dmorris/src/mycroft-core/mycroft/skills/skill_loader.py", line 72, in load_skill_module
    spec.loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/mycroft/skills/cpkodi-skill.pcwii/__init__.py", line 33, in <module>
    for each_module in sys.modules:
RuntimeError: dictionary keys changed during iteration
 14:59:12.774 | ERROR    |  5873 | mycroft.skills.skill_loader:_communicate_load_status:351 | Skill cpkodi-skill.pcwii failed to load

I was able to get it to load by changing for each_module in sys.modules: to for each_module in list(sys.modules):, but I don't know whether that solved the problem or disabled your sanity check.

pcwii commented 3 years ago

@david-morris I will investigate this. Honestly have not tried a clean install in a while. Just to confirm the change you performed for each_module in list(sys.modules): resulted in a successful loading? And the skill is working for you now. I still have a few items I would like to get implemented in this skill so any feedback is welcome. Thanks,

david-morris commented 3 years ago

@pcwii Yeah, that got it working for me. I also prefer to set the default return of convert_multiplicative to 1 so that I don't need to qualify directions with numbers.

david-morris commented 3 years ago

Closed by merge.