Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when trying to play artist - gmusic #5

Open
noname77 opened this issue Jul 21, 2017 · 9 comments
Open

error when trying to play artist - gmusic #5

noname77 opened this issue Jul 21, 2017 · 9 comments

Comments

@noname77
Copy link

Hey, thank you for the (hopefully? :) ) awesome skill.

i am trying to get mycroft play music from my google play music library.

i've setup the mopidy client with google play music and i can play it through an android mpd client.

i think i have installed your skill correctly, i can see it retrieving song names from mopidy during startup, but when i try to ask mycroft to play music (the widdler artist), this is what i get:

2017-07-21 16:00:16,728 - Skills - DEBUG - {"type": "recognizer_loop:record_begin", "data": {}, "context": null}
2017-07-21 16:00:16,732 - mopidy_skill - INFO - lowering volume
2017-07-21 16:00:16,733 - mopidy_skill - INFO - lowering volume
2017-07-21 16:00:16,766 - Skills - DEBUG - {"type": "recognizer_loop:record_end", "data": {}, "context": null}
2017-07-21 16:00:16,767 - mopidy_skill - INFO - maybe restoring volume
2017-07-21 16:00:16,775 - Skills - DEBUG - {"type": "recognizer_loop:wakeword", "data": {"session": "7173eb83-0b4e-4a58-b5e3-e75c62bcdbe3", "utterance": "hey mycroft"}, "context": null}
2017-07-21 16:00:18,781 - mopidy_skill - INFO - restoring volume
2017-07-21 16:00:18,782 - mopidy_skill - INFO - maybe restoring volume
2017-07-21 16:00:20,060 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-US", "session": "7173eb83-0b4e-4a58-b5e3-e75c62bcdbe3", "utterances": ["play the widdler"]}, "context": null}
2017-07-21 16:00:20,078 - Skills - DEBUG - {"type": "Mopidy Skill:PlayIntent", "data": {"PlayKeyword": "play", "intent_type": "Mopidy Skill:PlayIntent", "utterance": "play the widdler", "confidence": 0.3333333333333333, "target": null}, "context": {"target": null}}
2017-07-21 16:00:20,085 - mycroft.skills.core - ERROR - An error occurred while processing a request in Mopidy Skill
Traceback (most recent call last):
  File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/core.py", line 285, in receive_handler
    handler(message)
  File "/opt/mycroft/skills/mopidy_skill/__init__.py", line 143, in handle_play
    self.mopidy.resume()
AttributeError: 'MopidySkill' object has no attribute 'mopidy'
2017-07-21 16:00:20,100 - Skills - DEBUG - {"type": "speak", "data": {"expect_response": false, "utterance": "An error occurred while processing a request in Mopidy Skill"}, "contex
t": null}

similarily, when trying Otz artist:

2017-07-21 16:02:27,726 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-US", "session": "7173eb83-0b4e-4a58-b5e3-e75c62bcdbe3", "utterances": ["play ot
z"]}, "context": null}
2017-07-21 16:02:27,742 - Skills - DEBUG - {"type": "Mopidy Skill:PlayIntent", "data": {"PlayKeyword": "play", "intent_type": "Mopidy Skill:PlayIntent", "utterance": "play otz", "co
nfidence": 0.5, "target": null}, "context": {"target": null}}
2017-07-21 16:02:27,745 - mycroft.skills.core - ERROR - An error occurred while processing a request in Mopidy Skill
Traceback (most recent call last):
  File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/core.py", line 285, in receive_handler
    handler(message)
  File "/opt/mycroft/skills/mopidy_skill/__init__.py", line 143, in handle_play
    self.mopidy.resume()
AttributeError: 'MopidySkill' object has no attribute 'mopidy'

im on raspberry pi, installed manually with git clone. can provide more info if needed.

do you have any suggestions?

thanks,
nnm

@forslund
Copy link
Owner

Hi thanks for the report. It was a while since I used the gmusic part so I'll have to check it out. (mostly use spotify and local music).

This does sound a bit weird. The loading of artists and albums require self.mopidy (the same reference that isn't found in your error log). Since the play intent gets triggered self.mopidy has existed at some point but it's gone when calling handle_play()

@forslund
Copy link
Owner

Ok, looking over this one more time. It looks like the skill hasn't connected to the mopidy client properly and nothing has been registered (it's triggering the resume method which is to unpause music). I definitely need to make checks for this case and provide useful feedback.

@martymulligan made this guide to get the skill working with spotify: https://github.com/martymulligan/mopidy_skill/wiki/PiCroft:-Install-Mopidy-w--Spotify-and-the-mopidy_skill-for-Mycroft

Might be a good resource to check your installation while I keep searching and improving at my end =)

@noname77
Copy link
Author

thanks for looking into this and the hints.

I had a look at the guide and it seems pretty straight forward. i removed the skill (just cloned it to /opt/mycroft/skills before) and installed it with msm this time.

not sure if this is any helpful, but the first time the error pops up is during initial reloading of all skills (im just starting with mycroft so not sure what triggers this, but all skills are reloaded when initialising with ./start.sh skills)

2017-07-21 21:59:54,099 - Skills - DEBUG - Reloading Skill: skill-spelling
2017-07-21 21:59:54,102 - mycroft.skills.core - INFO - ATTEMPTING TO LOAD SKILL: skill-spelling
2017-07-21 21:59:54,108 - mycroft.skills.core - DEBUG - No dialog loaded, /opt/mycroft/skills/skill-spelling/dialog/en-us does not exist
2017-07-21 21:59:54,110 - Skills - DEBUG - {"type": "detach_skill", "data": {"skill_name": "SpellingSkill:"}, "context": null}
2017-07-21 21:59:54,120 - mycroft.skills.core - INFO - Loaded skill-spelling
2017-07-21 21:59:54,129 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "spell", "end": "SpellingKeyword"}, "context": null}
2017-07-21 21:59:54,134 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "spell word", "end": "SpellingKeyword"}, "context": null}
2017-07-21 21:59:54,139 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "spelling of", "end": "SpellingKeyword"}, "context": null}
2017-07-21 21:59:54,157 - Skills - DEBUG - Reloading Skill: mopidy_skill
2017-07-21 21:59:54,163 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "spelling of word", "end": "SpellingKeyword"}, "context": null}
2017-07-21 21:59:54,164 - mopidy_skill - INFO - Handling stop request
2017-07-21 21:59:54,168 - Skills - DEBUG - {"type": "register_vocab", "data": {"regex": "(spell the word|spelling of the word|spelling of|spell) (?P<Word>\\w+)"}, "context": null}
2017-07-21 21:59:54,174 - Skills - DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["SpellingKeyword", "SpellingKeyword"], ["Word", "Word"]], "optional
": [], "name": "SpellingSkill:SpellingIntent"}, "context": null}
2017-07-21 21:59:54,178 - Skills - DEBUG - {"type": "detach_skill", "data": {"skill_name": "Mopidy Skill:"}, "context": null}
Exception in thread Thread-14:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 1082, in run
    self.function(*self.args, **self.kwargs)
  File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/main.py", line 199, in _watch_skills
    skill["instance"].shutdown()
  File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/core.py", line 386, in shutdown
    self.stop()
  File "/opt/mycroft/skills/mopidy_skill/__init__.py", line 129, in stop
    self.mopidy.clear_list()
AttributeError: 'MopidySkill' object has no attribute 'mopidy'

I think I had some issues with alsa and pulseaudio on mopidy before. I also had mopidy_skill in both `/opt/mopidy/skills and ~/.mycroft/third_party_skills. i think i have cleaned that up now. i still get the above error though.

here is log from mopidy discovery and connection after i run sudo systemctl start mopidy:

2017-07-24 09:36:12,881 - Skills - DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}
MOPIDY URL: http://127.0.0.1:6680
2017-07-24 09:36:12,891 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:36:22,910 - Skills - DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}
MOPIDY URL: http://127.0.0.1:6680
2017-07-24 09:36:22,923 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:36:27,794 - mycroft.configuration - INFO - Loading configuration: /etc/mycroft/mycroft.conf
2017-07-24 09:36:27,796 - mycroft.configuration - DEBUG - Configuration '/etc/mycroft/mycroft.conf' not found
2017-07-24 09:36:27,800 - mycroft.configuration - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' loaded
2017-07-24 09:36:27,801 - mycroft.configuration - INFO - Loading configuration: /home/pi/.mycroft/mycroft.conf
2017-07-24 09:36:27,803 - mycroft.configuration - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' loaded
2017-07-24 09:36:27,807 - mycroft.configuration - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' loaded
2017-07-24 09:36:32,944 - Skills - DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}
MOPIDY URL: http://127.0.0.1:6680
2017-07-24 09:36:32,957 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:36:42,972 - Skills - DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}
MOPIDY URL: http://127.0.0.1:6680
2017-07-24 09:36:42,983 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1                                                    [118/748]
2017-07-24 09:36:53,003 - Skills - DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}
MOPIDY URL: http://127.0.0.1:6680
2017-07-24 09:36:53,014 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:03,030 - Skills - DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}
MOPIDY URL: http://127.0.0.1:6680
2017-07-24 09:37:03,039 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:13,055 - Skills - DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}
MOPIDY URL: http://127.0.0.1:6680
2017-07-24 09:37:13,065 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:13,473 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 43
2017-07-24 09:37:13,479 - mopidy_skill - INFO - Connected to mopidy server
2017-07-24 09:37:13,479 - mopidy_skill - INFO - Loading content
BROWSE
2017-07-24 09:37:13,488 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:13,520 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 41
[]
{}
BROWSE
2017-07-24 09:37:13,534 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:13,548 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 41
BROWSE
2017-07-24 09:37:13,562 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:14,614 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 1689
BROWSE
2017-07-24 09:37:14,631 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:14,670 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 41
BROWSE
2017-07-24 09:37:14,687 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:14,701 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 41
BROWSE
2017-07-24 09:37:14,717 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:14,732 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 41
GETTING PLAYLISTS
GETTING PLAYLISTS
2017-07-24 09:37:14,748 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:14,765 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 41
RETURNING PLAYLISTS
GETTING PLAYLISTS
2017-07-24 09:37:14,780 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1
2017-07-24 09:37:14,797 - requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 41
2017-07-24 09:37:14,802 - mopidy_skill - INFO - local                                                                                                                        [77/748]
2017-07-24 09:37:14,803 - mopidy_skill - INFO - local
2017-07-24 09:37:14,803 - mopidy_skill - INFO - local
2017-07-24 09:37:14,804 - mopidy_skill - INFO - local
2017-07-24 09:37:14,804 - mopidy_skill - INFO - gmusic
2017-07-24 09:37:14,805 - mopidy_skill - INFO - gmusic
2017-07-24 09:37:14,805 - mopidy_skill - INFO - gmusic
2017-07-24 09:37:14,805 - mopidy_skill - INFO - gmusic
2017-07-24 09:37:14,806 - mopidy_skill - INFO - spotify
2017-07-24 09:37:14,806 - mopidy_skill - INFO - spotify
2017-07-24 09:37:14,807 - mopidy_skill - INFO - spotify
2017-07-24 09:37:14,807 - mopidy_skill - INFO - spotify
2017-07-24 09:37:14,809 - mopidy_skill - DEBUG - Playlist: Nora Nights
2017-07-24 09:37:14,811 - mopidy_skill - DEBUG - Playlist: Night Falls
2017-07-24 09:37:14,814 - mopidy_skill - DEBUG - Playlist: Regenerate
2017-07-24 09:37:14,816 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Mopidy Skill", "end": "NameKeyword"}, "context": null}
2017-07-24 09:37:14,818 - mopidy_skill - DEBUG - Playlist: King Tubby
2017-07-24 09:37:14,823 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Nora Nights", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,821 - mopidy_skill - DEBUG - Playlist: Happiness On A Leash
`**`2017-07-24 09:37:14,827 - mopidy_skill - DEBUG - Playlist: I'm Feeling Lucky
2017-07-24 09:37:14,832 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Night Falls", "end": "PlaylistKeywordMopidy Skill"}, "context": null}`**`
2017-07-24 09:37:14,835 - mopidy_skill - DEBUG - Playlist: Broken_1440397745810.mp3
2017-07-24 09:37:14,841 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Regenerate", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,844 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "King Tubby", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,846 - mopidy_skill - DEBUG - Playlist: Ponderosa feat. Calibre
2017-07-24 09:37:14,851 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Happiness On A Leash", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,852 - mopidy_skill - DEBUG - Playlist: Over Here
2017-07-24 09:37:14,857 - mopidy_skill - DEBUG - Playlist: Flashback
2017-07-24 09:37:14,859 - mopidy_skill - DEBUG - Playlist: Redux
2017-07-24 09:37:14,861 - mopidy_skill - DEBUG - Playlist: Hey Blop (Original Mix)
2017-07-24 09:37:14,863 - mopidy_skill - DEBUG - Playlist: Heathered Pearls
`**`2017-07-24 09:37:14,866 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "I'm Feeling Lucky", "end": "PlaylistKeywordMopidy Skill"}, "context": null}`**`
2017-07-24 09:37:14,875 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Broken_1440397745810.mp3", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,892 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Ponderosa feat. Calibre", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,896 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Over Here", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,902 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Flashback", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,905 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Redux", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,911 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Hey Blop (Original Mix)", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,916 - Skills - DEBUG - {"type": "register_vocab", "data": {"start": "Heathered Pearls", "end": "PlaylistKeywordMopidy Skill"}, "context": null}
2017-07-24 09:37:14,923 - Skills - DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["PlayKeyword", "PlayKeyword"], ["PlaylistKeywordMopidy Skill", "Pla
ylistKeywordMopidy Skill"]], "optional": [], "name": "Mopidy Skill:PlayPlaylistIntentMopidy Skill"}, "context": null}
2017-07-24 09:37:14,930 - Skills - DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["PlayKeyword", "PlayKeyword"], ["PlaylistKeyword", "PlaylistKeyword
"], ["NameKeyword", "NameKeyword"]], "optional": [], "name": "Mopidy Skill:PlayFromIntentMopidy Skill"}, "context": null}
2017-07-24 09:37:14,935 - Skills - DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["SearchKeyword", "SearchKeyword"], ["Source", "Source"], ["SpotifyK
eyword", "SpotifyKeyword"]], "optional": [], "name": "Mopidy Skill:SearchSpotifyIntentMopidy Skill"}, "context": null}

annd when i try to play a playlist it fails with this error now:

2017-07-24 09:40:49,336 - Skills - DEBUG - {"type": "recognizer_loop:record_begin", "data": {}, "context": null}
2017-07-24 09:40:49,338 - mopidy_skill - INFO - lowering volume
2017-07-24 09:40:50,472 - Skills - DEBUG - {"type": "recognizer_loop:record_end", "data": {}, "context": null}
2017-07-24 09:40:50,474 - mopidy_skill - INFO - maybe restoring volume
2017-07-24 09:40:50,482 - Skills - DEBUG - {"type": "recognizer_loop:wakeword", "data": {"session": "6bdad957-edd0-4323-9aa3-60978f5420ff", "utterance": "hey mycroft"}, "context": n
ull}
2017-07-24 09:40:52,477 - mopidy_skill - INFO - restoring volume
2017-07-24 09:40:53,786 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-US", "session": "6bdad957-edd0-4323-9aa3-60978f5420ff", "utterances": ["play i'
m feeling lucky"]}, "context": null}
2017-07-24 09:40:53,808 - mycroft.skills.intent_service - ERROR - 
Traceback (most recent call last):
  File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/intent_service.py", line 54, in handle_utterance
    normalize(utterance, lang), 100))
StopIteration
2017-07-24 09:40:53,815 - Skills - DEBUG - {"type": "intent_failure", "data": {"lang": "en-US", "utterance": "play i'm feeling lucky"}, "context": null}
2017-07-24 09:40:53,818 - skill-wolfram-alpha__init__ - DEBUG - WolframAlpha fallback attempt: play i'm feeling lucky
2017-07-24 09:40:53,819 - skill-wolfram-alpha__init__ - DEBUG - Unknown intent: play i'm feeling lucky

similarily for an artist:

2017-07-24 10:03:51,832 - Skills - DEBUG - {"type": "recognizer_loop:wakeword", "data": {"session": "0dc97016-2fa7-40b0-ba0e-6d0abc06d622", "utterance": "hey mycroft"}, "context": null}
2017-07-24 10:03:51,840 - Skills - DEBUG - {"type": "intent_failure", "data": {"lang": "en-US", "utterance": "play sub focus"}, "context": null}
2017-07-24 10:03:51,841 - skill-wolfram-alpha__init__ - DEBUG - WolframAlpha fallback attempt: play sub focus
2017-07-24 10:03:51,843 - skill-wolfram-alpha__init__ - DEBUG - Unknown intent: play sub focus
2017-07-24 10:03:52,440 - mopidy_skill - INFO - restoring volume
2017-07-24 10:03:52,984 - mopidy_skill - INFO - restoring volume
2017-07-24 10:03:52,985 - mopidy_skill - INFO - maybe restoring volume
2017-07-24 10:03:54,988 - mopidy_skill - INFO - restoring volume
2017-07-24 10:03:55,036 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-US", "session": "0dc97016-2fa7-40b0-ba0e-6d0abc06d622", "utterances": ["play sub focus"]}, "context": null}
2017-07-24 10:03:55,049 - mycroft.skills.intent_service - ERROR - 
Traceback (most recent call last):
  File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/intent_service.py", line 54, in handle_utterance
    normalize(utterance, lang), 100))
StopIteration
2017-07-24 10:03:55,055 - Skills - DEBUG - {"type": "intent_failure", "data": {"lang": "en-US", "utterance": "play sub focus"}, "context": null}
2017-07-24 10:03:55,057 - skill-wolfram-alpha__init__ - DEBUG - WolframAlpha fallback attempt: play sub focus
2017-07-24 10:03:55,058 - skill-wolfram-alpha__init__ - DEBUG - Unknown intent: play sub focus

i can also see this when i run with ./mycroft.sh start -d

mopidy_skill - INFO - initializing Mopidy skill                                                                                                                                      
media - INFO - Initializing MediaSkill commons                                                                                                                                       
media - INFO - loading vocab files from /opt/mycroft/skills/mopidy_skill/vocab/en-us                                                                                                 
- DEBUG - {"type": "register_vocab", "data": {"start": "previous track", "end": "PrevKeyword"}, "context": null}                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "pause", "end": "PauseKeyword"}, "context": null}                                                                             
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "context": null}                                                                          
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"regex": "for (?P<Source>.*)"}, "context": null}                                                                                       
- DEBUG - {"type": "register_vocab", "data": {"start": "what is currently playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                              
- DEBUG - {"type": "register_vocab", "data": {"start": "what are you playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                   
- DEBUG - {"type": "register_vocab", "data": {"start": "what are we listening to", "end": "CurrentlyPlayingKeyword"}, "context": null}                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "what is playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "play", "end": "PlayKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Search", "end": "SearchKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "previous track", "end": "PrevKeyword"}, "context": null}                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "pause", "end": "PauseKeyword"}, "context": null}                                                                             
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "context": null}                                                                          
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["NextKeyword", "NextKeyword"]], "optional": [], "name": "Mopidy Skill:NextIntent"}, "context": null}
- DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["PrevKeyword", "PrevKeyword"]], "optional": [], "name": "Mopidy Skill:PrevIntent"}, "context": null}

and:

mycroft.skills.core - INFO - Loaded mopidy_skill                                                                                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "context": null}                                                                          
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"regex": "for (?P<Source>.*)"}, "context": null}                                                                                       
- DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}                                                                                                              
MOPIDY URL: http://127.0.0.1:6680                                                                                                                                                    
requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1                                                                                       
requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 43                                                                          
mopidy_skill - INFO - Connected to mopidy server                                                                                                                                     
mopidy_skill - INFO - Loading content  

here is a request sent back from mopidy with some gmusic titles

- DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["StopKeyword", "StopKeyword"]], "optional": [], "name": "StopSkill:StopIntent"}, "context": null}   
requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 136043                                                                      
~~~~Tubby's Special (1973-1976) (Disc One)", u'uri': u'gmusic:album:B3adzqmnrzrn7k47kk2btx7r6ue'}, {u'__model__': u'Ref', u'type': u'directory', u'name': u"King Tubby - King Tubby's
~~~~cawz6j74akfcldx3lwcnhma'}, {u'__model__': u'Ref', u'type': u'directory', u'name': u'Kromestar - Colourful Vibrations', u'uri': u'gmusic:album:B6bjmjxremwygnktiguaxdq26cu'}, {u'_
~~~~c:album:9d462d6eb3e40b8dcb9489789e72ed11'}, {u'__model__': u'Ref', u'type': u'directory', u'name': u'submerse - Melonkoly', u'uri': u'gmusic:album:Bgfb6z47cpudr4mks3r4aznyucy'}]
~~~~auna Stranger EP', u'uri': u'gmusic:album:dcd3218a2f1f25115ea814faee71f3d5'}, u'Nicolas Jaar - Break My Love / Calvino': {u'__model__': u'Ref', u'type': u'directory', u'name': u
~~~~2" Vinyl - RAMM78]': {u'__model__': u'Ref', u'type': u'directory', u'name': u'Sub Focus - Rock It / Follow The Light [12" Vinyl - RAMM78]', u'uri': u'gmusic:album:b84849a79ab990
~~~~ubmerse - Party Animals Vol II': {u'__model__': u'Ref', u'type': u'directory', u'name': u'Submerse - Party Animals Vol II', u'uri': u'gmusic:album:Bsc7mh7mtve3e5344h4rgt7er3q'}}

i also have some local music in mopidy and it does not let me play that neither. next time i might try to remove gmusic from mopidy and see if your skill will work on local stuff.

@forslund
Copy link
Owner

Thanks for the debug info. The error you're getting is that there's no matching intent found.

Seems like The artist sub focus isn't getting registered and for I'm feeling lucky I have no idea why this fails.

The intents for this skill require the PlayKeyword and PlaylistKeyword apparently the playlist keywords get registered but the intent can't be triggered.

Could you verify that the PlayKeyword.voc exists in the skill vocab directory? Should be `/opt/mycroft/skills/mopidy_skill/vocab/en-us

I've tested here and it's working for my files.

@noname77
Copy link
Author

the contents of vocab directory:

pi@donald:/opt/mycroft/skills/mopidy_skill/vocab/en-us $ ls -l /opt/mycroft/skills/mopidy_skill/vocab/en-us
total 32
-rw-r--r-- 1 pi pi 88 Jul 22 17:33 CurrentlyPlayingKeyword.voc
-rw-r--r-- 1 pi pi 16 Jul 22 17:33 NextKeyword.voc
-rw-r--r-- 1 pi pi  6 Jul 22 17:33 PauseKeyword.voc
-rw-r--r-- 1 pi pi  5 Jul 22 17:33 PlayKeyword.voc
-rw-r--r-- 1 pi pi 15 Jul 22 17:33 PrevKeyword.voc
-rw-r--r-- 1 pi pi 15 Jul 22 17:33 ResumeKeyword.voc
-rw-r--r-- 1 pi pi  7 Jul 22 17:33 SearchKeyword.voc
-rw-r--r-- 1 pi pi  8 Jul 22 17:33 SpotifyKeyword.voc

also found this in the log, not sure if the GFlags are for google music and if it is in any way related:

~~~~li'}, {u'__model__': u'Ref', u'type': u'directory', u'name': u'The Widdler - Nemesis / Go Ask Alice / I Dont Need You', u'uri': u'gmusic:album:Btwmpvs7sulj4zdbl2yy3oxxvsy'}, {u'
~~~~: u'directory', u'name': u'The xx - Coexist', u'ur2017-07-25 15:07:19,686 - - DEBUG - {"type": "register_vocab", "data": {"start": "boston", "end": "Location"}, "context": null}
- DEBUG - {"type": "register_vocab", "data": {"start": "washington d c", "end": "Location"}, "context": null}                                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "atlanta", "end": "Location"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "rain", "end": "WeatherType"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "raining", "end": "WeatherType", "alias_of": "rain"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "snow", "end": "WeatherType"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "snowing", "end": "WeatherType", "alias_of": "snow"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "sleet", "end": "WeatherType"}, "context": null}                                                                              
~~~~f', u'type': u'directory', u'name': u'Zeds Dead & Oliver Heldens - Unknown Album', u'uri': u'gmusic:album:12f61526957019f320b354a2cbd7cec6'}, {u'__model__': u'Ref', u'type': u'd
~~~~c:album:9d462d6eb3e40b8dcb9489789e72ed11'}, {u'__model__': u'Ref', u'type': u'directory', u'name': u'submerse - Melonkoly', u'uri': u'gmusic:album:Bgfb6z47cpudr4mks3r4aznyucy'}]
- DEBUG - {"type": "register_vocab", "data": {"start": "hail", "end": "WeatherType"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "hailing", "end": "WeatherType", "alias_of": "hail"}, "context": null}                                                        
                                                                                                                                                                                     
** (process:7830): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'                                                               
                                                                                                                                                                                     
** (process:7830): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'                                                               
                                                                                                                                                                                     
** (process:7830): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'                                                                
~~~~': u'gmusic:album:Bysw6ndjhq7eu7treok7siwg6jm'},2017-07-25 15:07:19,930 - - DEBUG - {"type": "register_vocab", "data": {"start": "sunny", "end": "WeatherType"}, "context": null}

I have went through the logs carefully again and here is a full log from mopidy skill loading:

mycroft.skills.core - INFO - ATTEMPTING TO LOAD SKILL: mopidy_skill                                                                                                                  
- DEBUG - {"type": "register_vocab", "data": {"start": "what is currently playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                              
- DEBUG - {"type": "register_vocab", "data": {"start": "what are you playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                   
- DEBUG - {"type": "register_vocab", "data": {"start": "what are we listening to", "end": "CurrentlyPlayingKeyword"}, "context": null}                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "what is playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "play", "end": "PlayKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Search", "end": "SearchKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "previous track", "end": "PrevKeyword"}, "context": null}                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "pause", "end": "PauseKeyword"}, "context": null}                                                                             
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "conte                                                                                    
xt": null}                                                                                                                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
mopidy_skill - INFO - initializing Mopidy skill                                                                                                                                      
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
media - INFO - Initializing MediaSkill commons                                                     
media - INFO - loading vocab files from /opt/mycroft/skills/mopidy_skill/vocab/en-us                                                                                                 
- DEBUG - {"type": "register_vocab", "data": {"regex": "for (?P<Source>.*)"}, "context": null}                                                                                       
- DEBUG - {"type": "register_vocab", "data": {"start": "what is currently playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                              
- DEBUG - {"type": "register_vocab", "data": {"start": "what are you playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                   
- DEBUG - {"type": "register_vocab", "data": {"start": "what are we listening to", "end": "CurrentlyPlayingKeyword"}, "context": null}                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "what is playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "play", "end": "PlayKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Search", "end": "SearchKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "previous track", "end": "PrevKeyword"}, "context": null}                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "pause", "end": "PauseKeyword"}, "context": null}                                                                             
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "context": null}                                                                          
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["NextKeyword", "NextKeyword"]], "optional": [], "name": "Mopidy Skill:NextIntent"}, "context": null}
- DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["PrevKeyword", "PrevKeyword"]], "optional": [], "name": "Mopidy Skill:PrevIntent"}, "context": null}
~~~~ - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["PauseKeyword", "PauseKeyword"]], "optional": [], "name": "Mopidy Skill:PauseIntent"}, "context": null}
~~~~G - {"type": "register_intent", "data": {"at_least_one": [["PlayKeyword", "ResumeKeyword"]], "requires": [], "optional": [], "name": "Mopidy Skill:PlayIntent"}, "context": null}
~~~~ata": {"at_least_one": [], "requires": [["CurrentlyPlayingKeyword", "CurrentlyPlayingKeyword"]], "optional": [], "name": "Mopidy Skill:CurrentlyPlayingIntent"}, "context": null}
- DEBUG - {"type": "register_vocab", "data": {"start": "what is currently playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                              
- DEBUG - {"t                                                                                                                                                                        
ype": "register_vocab", "data": {"start": "what are you playing", "end": "CurrentlyPlayingKeyword"}, "context": null}
- DEBUG - {"type": "register_vocab", "data": {"start": "what are we listening to", "end": "CurrentlyPlayingKeyword"}, "context": null}                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "what is playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "play", "end": "PlayKeyword"}, "context": null}                                                                               
mycroft.skills.core - INFO - Loaded mopidy_skill                                                                                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "Search", "end": "SearchKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "previous track", "end": "PrevKeyword"}, "context": null}                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "pause", "end": "PauseKeyword"}, "context": null}                                                                             
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "context": null}                                                                          
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"regex": "for (?P<Source>.*)"}, "context": null}                                                                                       
- DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}                                                                                                              
MOPIDY URL: http://127.0.0.1:6680                                                                                                                                                    
requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1                                                                                       
requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 43                                                                          
mopidy_skill - INFO - Connected to mopidy server                                                                                                                                     
mopidy_skill - INFO - Loading content                                                                                                                                                
BROWSE                                                                                                                                                                               
requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1

then i can see a long json being retrieved that interleaves debug messages from other skills. some of the fields say gmusic and type:directory. then the mopidy skill gets reloaded

- DEBUG - Reloading Skill: mopidy_skill                                                                                                                                              
mopidy_skill - INFO - Handling stop request                                                                                                                                          
False 
mycroft.skills.core - INFO - ATTEMPTING TO LOAD SKILL: mopidy_skill                                                                                                                  
- DEBUG - {"type": "detach_skill", "data": {"skill_name": "Mopidy Skill:"}, "context": null}                                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "what is currently playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                              
- DEBUG - {"type": "register_vocab", "data": {"start": "what are you playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                   
- DEBUG - {"type": "register_vocab", "data": {"start": "what are we listening to", "end": "CurrentlyPlayingKeyword"}, "context": null}                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "what is playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "play", "end": "PlayKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Search", "end": "SearchKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "previous track", "end": "PrevKeyword"}, "context": null}                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "pause", "end": "PauseKeyword"}, "context": null}                                                                             
mopidy_skill - INFO - initializing Mopidy skill                                                                                                                                      
media - INFO - Initializing MediaSkill commons                                                                                                                                       
media - INFO - loading vocab files from /opt/mycroft/skills/mopidy_skill/vocab/en-us
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "context": null}                                                                          
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"regex": "for (?P<Source>.*)"}, "context": null}                                                                                       
- DEBUG - {"type": "register_vocab", "data": {"start": "what is currently playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                              
- DEBUG - {"type": "register_vocab", "data": {"start": "what are you playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                   
- DEBUG - {"type": "register_vocab", "data": {"start": "what are we listening to", "end": "CurrentlyPlayingKeyword"}, "context": null}                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "what is playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "play", "end": "PlayKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Search", "end": "SearchKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "previous track", "end": "PrevKeyword"}, "context": null}                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "pause", "end": "PauseKeyword"}, "context": null}                                                                             
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
Ski                                                                                                                                                                                  
lls - DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "context": null}                                                                      
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["NextKeyword", "NextKeyword"]], "optional": [], "name": "Mopidy Skill:NextIntent"}, "context": null}
- DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["PrevKeyword", "PrevKeyword"]], "optional": [], "name": "Mopidy Skill:PrevIntent"}, "context": null}
~~~~ - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["PauseKeyword", "PauseKeyword"]], "optional": [], "name": "Mopidy Skill:PauseIntent"}, "context": null}
mycroft.skills.core - INFO - Loaded mopidy_skill
~~~~G - {"type": "register_intent", "data": {"at_least_one": [["PlayKeyword", "ResumeKeyword"]], "requires": [], "optional": [], "name": "Mopidy Skill:PlayIntent"}, "context": null}
~~~~ata": {"at_least_one": [], "requires": [["CurrentlyPlayingKeyword", "CurrentlyPlayingKeyword"]], "optional": [], "name": "Mopidy Skill:CurrentlyPlayingIntent"}, "context": null}
- DEBUG - {"type": "register_vocab", "data": {"start": "what is currently playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                              
- DEBUG - {"type": "register_vocab", "data": {"start": "what are you playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                   
- DEBUG - {"type": "register_vocab", "data": {"start": "what are we listening to", "end": "CurrentlyPlayingKeyword"}, "context": null}                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "what is playing", "end": "CurrentlyPlayingKeyword"}, "context": null}                                                        
- DEBUG - {"type": "register_vocab", "data": {"start": "play", "end": "PlayKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Search", "end": "SearchKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "previous track", "end": "PrevKeyword"}, "context": null}                                                                     
- DEBUG - {"type": "register_vocab", "data": {"start": "pause", "end": "PauseKeyword"}, "context": null}                                                                             
- DEBUG - {"type": "register_vocab", "data": {"start": "resume", "end": "ResumeKeyword"}, "context": null}                                                                           
- DEBUG - {"type": "register_vocab", "data": {"start": "unpause", "end": "ResumeKeyword"}, "context": null}                                                                          
- DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}                                                                               
- DEBUG - {"type": "register_vocab", "data": {"start": "Spotify", "end": "SpotifyKeyword"}, "context": null}                                                                         
- DEBUG - {"type": "register_vocab", "data": {"regex": "for (?P<Source>.*)"}, "context": null}                                                                                       
- DEBUG - {"type": "Mopidy Skill.connect", "data": {}, "context": null}                                                                                                              
MOPIDY URL: http://127.0.0.1:6680                                                                                                                                                    
requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1                                                                                       
requests.packages.urllib3.connectionpool - DEBUG - http://127.0.0.1:6680 "POST /mopidy/rpc HTTP/1.1" 200 43                                                                          
mopidy_skill - INFO - Connected to mopidy server                                                                                                                                     
mopidy_skill - INFO - Loading content                                                                                                                                                
BROWSE                                                                                                                                                                               
requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1

and then I can see another reload that crashes:

- DEBUG - Reloading Skill: mopidy_skill                                                                                                                                              
mopidy_skill - INFO - Handling stop request                                                                                                                                          
- DEBUG - {"type": "detach_skill", "data": {"skill_name": "Mopidy Skill:"}, "context": null}                                                                                         
Exception in thread Thread-14:                                                                                                                                                       
Traceback (most recent call last):                                                                                                                                                   
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner                                                                                                               
self.run()                                                                                                                                                                           
File "/usr/lib/python2.7/threading.py", line 1082, in run                                                                                                                            
self.function(*self.args, **self.kwargs)                                                                                                                                             
File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/main.py", line 199, in _watch_skills                                                                                   
skill["instance"].shutdown()                                                                                                                                                         
File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/core.py", line 386, in shutdown                                                                                        
self.stop()                                                                                                                                                                          
File "/opt/mycroft/skills/mopidy_skill/__init__.py", line 129, in stop                                                                                                               
self.mopidy.clear_list()                                                                                                                                                             
AttributeError: 'MopidySkill' object has no attribute 'mopidy'   

@forslund
Copy link
Owner

Hmm, those reloads are a bit weird. But that's something that could potentially cause problems. Will try to fix it.

@forslund
Copy link
Owner

Pushed a fix for the reload crash. should at least take care of that problem even if it's not the source of your problems it can't hurt =)

@noname77
Copy link
Author

hmm, are the reloads not normal behaviour in mycroft? all my skills keep reloading, maybe I should try to remove the source of that first?

after the fix the previous error is gone and the mopidy_skill reloads fine all the time.

when trying to play an artist (not sure if it knows how to handle 'play artist', but i tried with just 'play' with same result) i now get:

- DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-us", "utterances": ["play artist otz"]}, "context": null}                                                       
~~~~"PlayKeyword": "play", "intent_type": "Mopidy Skill:PlayIntent", "utterance": "play artist otz", "confidence": 0.26666666666666666, "target": null}, "context": {"target": null}}
mycroft.skills.core - ERROR - An error occurred while processing a request in Mopidy Skill                                                                                           
Traceback (most recent call last):                                                                                                                                                   
File "/home/pi/Documents/Projects/mycroft-core/mycroft/skills/core.py", line 285, in receive_handler                                                                                 
handler(message)                                                                                                                                                                     
File "/opt/mycroft/skills/mopidy_skill/__init__.py", line 145, in handle_play                                                                                                        
self.mopidy.resume()                                                                                                                                                                 
AttributeError: 'NoneType' object has no attribute 'resume'                                                                                                                          
- DEBUG - {"type": "speak", "data": {"expect_response": false, "utterance": "An error occurred while processing a request in Mopidy Skill"}, "context": null}  

@forslund
Copy link
Owner

Well, the reload should only happen if the skill is modified. I guess it may be triggered by python generating .pyc files...

I wonder if the reloads are messing with the connection tying up the port and then after the final reload it isn't connected.

I'll try to trigger this reload behavior here and see what it yields. I'll keep you posted!

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

No branches or pull requests

2 participants