samclane / lifx-mycroft

A mycroft skill to control LIFX brand smartlights
GNU General Public License v3.0
8 stars 3 forks source link

Unable to load skill on Picroft #3

Closed camuthig closed 6 years ago

camuthig commented 6 years ago

I am trying to add this skill to my Picroft setup. I installed it using msm, and then started up Mycroft. During load, I am getting a syntax error.

03:58:29.700 - mycroft.skills.core:load_skill:159 - ERROR - Failed to load skill: lifx-mycroft.samclane
Traceback (most recent call last):
  File "/home/pi/mycroft-core/mycroft/skills/core.py", line 126, in load_skill
    imp.PY_SOURCE))
  File "/usr/lib/python3.5/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 693, in _load
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 669, in exec_module
  File "<frozen importlib._bootstrap_external>", line 775, in get_code
  File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/opt/mycroft/skills/lifx-mycroft.samclane/__init__.py", line 45
    light: lifxlan.Light = light
         ^
SyntaxError: invalid syntax

On startup, Picroft is telling me it is on version 18.8.5. Let me know if there is anything else I can provider to help troubleshoot.

samclane commented 6 years ago

Some Python interpreters don't like type hinting. Since it didn't benefit me much anyway, I removed all instances of annotations from the code. It's pushed right now under commit (db3bb345a7abb9fc261c90f1b1ff968c13f7a029). If you have the skill installed from the Mycroft Skills repository, you'll have to wait until they accept my PR (which could be a bit, seeing as they had to fix some bugs in their build/test system to get my 1.0 to pass). If you just want the Skill, you can install the latest version directly with msm install https://github.com/samclane/lifx-mycroft.git.

I'm going to avoid closing the issue and tagging the release until it gets accepted into the Skills repository, just for my own records. It'll most likely be 1.01.

Thanks for pointing out this bug!

samclane commented 6 years ago

Merged into 18.08. Closing.