MycroftAI / skill-homeassistant

Mycroft Skill/Integration for Homeassistant
GNU Lesser General Public License v3.0
114 stars 62 forks source link

Failed to load 'nothing to repeat at position 0' #39

Closed Gotanius closed 4 years ago

Gotanius commented 4 years ago

After install and when trying to load the skill the following shows up and the skill doesn't load.

2020-06-14 09:45:54.899 | ERROR | 1819 | mycroft.skills.skill_loader:_create_skill_instance:249 | Skill initialization failed with error('nothing to repeat at position 0') Traceback (most recent call last): File "/home/pi/mycroft-core/mycroft/skills/skill_loader.py", line 238, in _create_skill_instance self.instance.load_data_files() File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/mycroft_skill.py", line 1180, in load_data_files self.load_regex_files(root_directory) File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/mycroft_skill.py", line 1217, in load_regex_files regexes = load_regex(regex_dir, self.skill_id) File "/home/pi/mycroft-core/mycroft/skills/skill_data.py", line 107, in load_regex regexes += load_regex_from_file(join(path, f), skill_id) File "/home/pi/mycroft-core/mycroft/skills/skill_data.py", line 68, in load_regex_from_file re.compile(regex) File "/usr/lib/python3.7/re.py", line 234, in compile return _compile(pattern, flags) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 930, in parse p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0) File "/usr/lib/python3.7/sre_parse.py", line 426, in _parse_sub not nested and not items)) File "/usr/lib/python3.7/sre_parse.py", line 651, in _parse source.tell() - here + len(this)) re.error: nothing to repeat at position 0

Running (picroft) 20.2.4 with language set to nl-nl

After some testing I noticed that when I take regex/nl-nl folder out of the equation the skill loads perfectly. Further testing (copying files 1 by 1) resulted in finding that numvalue.rx was the culprit. After replacing it with the en-us version the skill loaded correctly. It seems like a '(' is missing from the line.