MycroftAI / skill-desktop-launcher

Mycroft AI official Desktop Launcher Skill - launch applications in Linux
https://mycroft.ai/skills
Apache License 2.0
11 stars 16 forks source link

"Open firefox" #12

Open Atherz97 opened 5 years ago

Atherz97 commented 5 years ago

Set my custom skill link: https://github.com/MycroftAI/skill-desktop-launcher.git "download custom skill" installs "mycroft open firefox" "I don't know what that means" "mycroft open konsole" "I don't understand" "mycroft open gimp" "Sorry I didn't catch that" "mycroft open documents folder" "I don't understand"

Kubuntu 18.04?

And also what's the easiest way to set up simple commands like "hear this, do 'dolphin ~/Documents' ? Honestly all I need is a voice recognizer to link to custom bash commands/scripts and for text input.

JenKD commented 5 years ago

Hi, same issue after updating to 19.02 version : desktop launcher does not work any longer.

17:40:02.336 - mycroft.skills.padatious_service:handle_fallback:136 - DEBUG - Pa datious fallback attempt: open firefox 17:40:02.340 - QuestionsAnswersSkill - INFO - Searching for open firefox 17:40:02.341 - WolframAlphaSkill - DEBUG - WolframAlpha query: open firefox 17:40:02.342 - WolframAlphaSkill - DEBUG - Non-question, ignoring: open firefox 17:40:03.094 - QuestionsAnswersSkill - INFO - Timeout occured check responses

Would appreciate it if you could fix this.

best regards, Johan

forslund commented 5 years ago

I've pushed a small update that might help the issue you're seeing. Basically adding the missing skill manifest which should allow the skill to load.

JenKD commented 5 years ago

yes ! quick and effective!

Thanks!! Johan

adocampo commented 5 years ago

Just tried the skill today. It doesn't works.

17:34:08.016 - __main__:handle_utterance:62 - INFO - Utterance: ['open firefox']
17:34:08.036 - QuestionsAnswersSkill - INFO - Searching for open firefox
17:34:09.457 - QuestionsAnswersSkill - INFO - Timeout occured check responses

open firefox                                                                                                                            
 >> You might have to say that a different way.
adocampo commented 5 years ago

I saw on the logs this:

17:42:51.069 - msm.mycroft_skills_manager - ERROR - Error running install_or_update on skill-desktop-launcher: PipRequirementsException(
        Pip returned code 1:
        Collecting pygobject
~~~~ps://files.pythonhosted.org/packages/40/ee/8daf797cda4ffe7724b9d47cbb5e2b44ca6235764622d163c586bd9bd7c5/PyGObject-3.32.2.tar.gz (698kB)
          Installing build dependencies: started
          Installing build dependencies: finished with status 'done'
        Collecting pycairo>=1.11.1 (from pygobject)
        Building wheels for collected packages: pygobject
          Running setup.py bdist_wheel for pygobject: started
          Running setup.py bdist_wheel for pygobject: finished with status 'error'
~~~~read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-t29syu7i --python-tag cp37:
          running bdist_wheel
          running build
          running build_py
          creating build
          creating build/lib.linux-x86_64-3.7
          creating build/lib.linux-x86_64-3.7/pygtkcompat
          copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-3.7/pygtkcompat
          copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-3.7/pygtkcompat
          copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-3.7/pygtkcompat
          creating build/lib.linux-x86_64-3.7/gi
          copying gi/types.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/pygtkcompat.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/module.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/importer.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/docstring.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/_signalhelper.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/_propertyhelper.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/_ossighelper.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/_option.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/_gtktemplate.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/_error.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/_constants.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/_compat.py -> build/lib.linux-x86_64-3.7/gi
          copying gi/__init__.py -> build/lib.linux-x86_64-3.7/gi
          creating build/lib.linux-x86_64-3.7/gi/repository
          copying gi/repository/__init__.py -> build/lib.linux-x86_64-3.7/gi/repository
          creating build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/__init__.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/Pango.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/Gio.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/GObject.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/GLib.py -> build/lib.linux-x86_64-3.7/gi/overrides
          copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-3.7/gi/overrides
          running build_ext
          Package gobject-introspection-1.0 was not found in the pkg-config search path.
          Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
          to the PKG_CONFIG_PATH environment variable
          Package 'gobject-introspection-1.0', required by 'virtual:world', not found
          Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.46.0')' returned non-zero exit status 1.

-----------------
          Running setup.py clean for pygobject
        Failed to build pygobject
        Installing collected packages: pycairo, pygobject
          Running setup.py install for pygobject: started
            Running setup.py install for pygobject: finished with status 'error'
~~~~ord.txt --single-version-externally-managed --compile --install-headers /usr/share/mycroft-core/.venv/include/site/python3.7/pygobject:
            running install
            running build
            running build_py
            creating build
            creating build/lib.linux-x86_64-3.7
            creating build/lib.linux-x86_64-3.7/pygtkcompat
            copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-3.7/pygtkcompat
            copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-3.7/pygtkcompat
            copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-3.7/pygtkcompat
            creating build/lib.linux-x86_64-3.7/gi
            copying gi/types.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/pygtkcompat.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/module.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/importer.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/docstring.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/_signalhelper.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/_propertyhelper.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/_ossighelper.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/_option.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/_gtktemplate.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/_error.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/_constants.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/_compat.py -> build/lib.linux-x86_64-3.7/gi
            copying gi/__init__.py -> build/lib.linux-x86_64-3.7/gi
            creating build/lib.linux-x86_64-3.7/gi/repository
            copying gi/repository/__init__.py -> build/lib.linux-x86_64-3.7/gi/repository
            creating build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/__init__.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/Pango.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/Gio.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/GObject.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/GLib.py -> build/lib.linux-x86_64-3.7/gi/overrides
            copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-3.7/gi/overrides
            running build_ext
            Package gobject-introspection-1.0 was not found in the pkg-config search path.
            Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
            to the PKG_CONFIG_PATH environment variable
            Package 'gobject-introspection-1.0', required by 'virtual:world', not found
            Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.46.0')' returned non-zero exit status 1.

            ----------------------------------------

          Failed building wheel for pygobject
~~~~eaders /usr/share/mycroft-core/.venv/include/site/python3.7/pygobject" failed with error code 1 in /tmp/pip-install-haa864o3/pygobject/
        You are using pip version 18.0, however version 19.2.1 is available.
        You should consider upgrading via the 'pip install --upgrade pip' command.
)
17:42:51.607 - mycroft.skills.skill_manager:download_skills:227 - ERROR - Could not upload skill manifest
Traceback (most recent call last):
  File "/usr/share/mycroft-core/mycroft/skills/skill_manager.py", line 225, in download_skills
    DeviceApi().upload_skills_data(msm.skills_data)
  File "/usr/share/mycroft-core/mycroft/api/__init__.py", line 383, in upload_skills_data
    "json": to_send
  File "/usr/share/mycroft-core/mycroft/api/__init__.py", line 65, in request
    return self.send(params)
  File "/usr/share/mycroft-core/mycroft/api/__init__.py", line 148, in send
    return self.get_response(response, no_refresh)
  File "/usr/share/mycroft-core/mycroft/api/__init__.py", line 170, in get_response
    raise HTTPError(data, response=response)
requests.exceptions.HTTPError: {'skills': {'0': {'update': 'Rogue field'}, '1': {'update': 'Rogue field'}}}
  ^--- NEWEST ---^ 
krisgesling commented 5 years ago

Hi adocampo,

What OS are you on?

I just gave it a go on a Debian Buster derivative and got the same error. I needed to: sudo apt-get install libgirepository1.0-dev

It also seems that libcairo-dev is libcairo2-dev for me

adocampo commented 5 years ago

Thank yoy @krisgesling I'm on arch linux, and the package needed to solve the exception was python2-gobject... I already had the python-gobject (python3) but this skill seems to use still python2.

17:13:37.538 - mycroft.skills.core:load_skill:168 - ERROR - Failed to load skill: skill-desktop-launcher
Traceback (most recent call last):
  File "/usr/share/mycroft-core/mycroft/skills/core.py", line 130, in load_skill
    imp.PY_SOURCE))
  File "/usr/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/mycroft/skills/skill-desktop-launcher/__init__.py", line 26, in <module>
    from gi.repository import Gio as gio
ModuleNotFoundError: No module named 'gi'

but still doesn't work... now the logs shows this:

12:42:22.683 - mycroft.skills.intent_service:handle_utterance:349 - DEBUG - Padatious intent: {'name': 'mycroft-installer.mycroftai:install.beta.intent', 'sent': 'open firefox', 'matches': {}, 'conf': 0.1643574742814676}
12:42:22.684 - mycroft.skills.intent_service:handle_utterance:350 - DEBUG -     Adapt intent: None
12:42:22.685 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
12:42:22.686 - mycroft.skills.padatious_service:handle_fallback:148 - DEBUG - Padatious fallback attempt: open firefox
12:42:22.687 - QuestionsAnswersSkill - INFO - Searching for open firefox
12:42:22.688 - WolframAlphaSkill - DEBUG - WolframAlpha query: open firefox
12:42:22.689 - WolframAlphaSkill - DEBUG - Non-question, ignoring: open firefox
12:42:23.080 - QuestionsAnswersSkill - INFO - Timeout occured check responses
12:42:23.176 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "POST /v1/device/5cffcf9b-92ce-4be5-9005-fd9a4bb39bf5/metric/timing HTTP/1.1" 204 0
12:42:23.688 - mycroft.skills.padatious_service:handle_fallback:148 - DEBUG - Padatious fallback attempt: open firefox

I have both cairo and and cairo python/python2 bindings... :|

Blake-McCullough commented 3 years ago

Just tried to day, did all methods to fix, using ubuntu, no work :(