Pandora on PiCroft


#1

Hi All,
I’m attempting to use the Pandora skill on my PiCroft installation. In my skills/account information I have my login information which I know is correct but for some reason Mycroft can’t seem to use it. I’ve tried uninstalling the skill, reinstalling the skill, and doing a configuration up date but nothing seems to resolve this.
I am repeatedly given an error that says:
“Pandora failed to load. Please verify your email and password at home.mycroft.ai”
“Starting Pandora”
"An error occurred while processing a resquest in Pianobar Skill"
Any suggestions to get this Pandora or Pianobar skill working?

On a related note, I started poking around my device and discovered that in the /opt/Mycroft/skills/pianobar-skill location there is a settings.json that appears to have my Pandora login and password information in plain text (yikes!) which seems like a security concern.


#2

I would recommend looking at the debug logs and posting them of right after you say play pandora. You can do this via voice with hey mycroft, create a support ticket.


#3

That’s an excellent suggestion thank you! I did that and nothing jumped out at me that appeared specific to Pandora that I can tell. Here is the enclosure portion of my log:

=== /var/log/mycroft-enclosure-client.log ===
16:29:44.643 - root - INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
16:29:44.885 - root - INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
16:29:45.821 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-18.2.2-py2.7.egg/mycroft/configuration/mycroft.conf loaded
16:29:45.830 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-18.2.2-py2.7.egg/mycroft/configuration/mycroft.conf loaded
16:29:45.835 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
16:29:45.850 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration ‘/home/mycroft/.mycroft/mycroft.conf’ not found
16:29:45.864 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
16:29:46.656 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 “GET /v1/device/e45e9929-ce4b-4ce2-b041-38e03314cfc5 HTTP/1.1” 200 441
16:29:46.673 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-18.2.2-py2.7.egg/mycroft/configuration/mycroft.conf loaded
16:29:46.678 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
16:29:46.682 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration ‘/home/mycroft/.mycroft/mycroft.conf’ not found
16:29:46.688 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
16:29:47.162 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 “GET /v1/device/e45e9929-ce4b-4ce2-b041-38e03314cfc5/setting HTTP/1.1” 200 2919
16:29:47.183 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
16:29:47.775 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 “GET /v1/device/e45e9929-ce4b-4ce2-b041-38e03314cfc5/location HTTP/1.1” 200 4
16:29:47.804 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
16:29:47.808 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration ‘/home/mycroft/.mycroft/mycroft.conf’ not found
16:29:47.825 - mycroft.client.enclosure:__init_serial:334 - INFO - Connected to: /dev/ttyAMA0 rate: 9600 timeout: 5.0
16:29:47.838 - mycroft.client.enclosure.display_manager:initiate_display_manager_ws:146 - INFO - Initiating display manager websocket
16:29:47.857 - mycroft.messagebus.client.ws:on_error:71 - ERROR - Exception(“Uncaught ‘error’ event.”,)
16:29:47.860 - mycroft.messagebus.client.ws:on_error:72 - WARNING - WS Client will reconnect in 5 seconds.
16:29:47.876 - mycroft.messagebus.client.ws:on_error:71 - ERROR - Exception(“Uncaught ‘error’ event.”,)
16:29:47.880 - mycroft.messagebus.client.ws:on_error:72 - WARNING - WS Client will reconnect in 5 seconds.
06:31:25.573 - mycroft.messagebus.client.ws:on_open:58 - INFO - Connected
06:31:25.588 - mycroft.messagebus.client.ws:on_open:58 - INFO - Connected


#4

I’m having the same issue.


#5

More detail:
In /var/log/mycroft-enclosure-client.log I am repeatedly seeing “mycroft.configuration.config:load_local:133 - DEBUG - Configuration ‘/home/pi/.mycroft/mycroft.conf’ not found”

When I try to “play pandora” the log includes:

“Traceback (most recent call last):
File “/usr/local/lib/python2.7/site-packages/mycroft_core-18.2.3-py2.7.egg/mycroft/configuration/config.py”, line 167, in init
location = api.get_location()
File “/usr/local/lib/python2.7/site-packages/mycroft_core-18.2.3-py2.7.egg/mycroft/api/init.py”, line 241, in get_location
"path”: “/” + self.identity.uuid + “/location"
File “/usr/local/lib/python2.7/site-packages/mycroft_core-18.2.3-py2.7.egg/mycroft/api/init.py”, line 61, in request
return self.send(params)
File “/usr/local/lib/python2.7/site-packages/mycroft_core-18.2.3-py2.7.egg/mycroft/api/init.py”, line 86, in send
data=data, json=json, timeout=(3.05, 15))
File “/usr/local/lib/python2.7/site-packages/requests/api.py”, line 56, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python2.7/site-packages/requests/sessions.py”, line 488, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python2.7/site-packages/requests/sessions.py”, line 609, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python2.7/site-packages/requests/adapters.py”, line 499, in send
raise ReadTimeout(e, request=request)
ReadTimeout: HTTPSConnectionPool(host=‘api.mycroft.ai’, port=443): Read timed out. (read timeout=15)”

Any help would be appreciated.


#6

Even more detail:

If I switch to the /etc/mycroft before invoking the cli, the “play pandora” yields:

“17:26:39.394 - pianobar-skill__init__:extract_station:338 - INFO - ‘NoneType’ object has no attribute 'getitem
17:26:39.399 - pianobar-skill__init
_:play_station:342 - INFO - Starting: None
17:26:39.412 - pianobar-skill__init
_:launch_pianobar_process:288 - INFO - Starting Pianobar process
17:26:44.483 - pianobar-skill__init
_:_play_station:383 - INFO - list index out of range
17:26:44.501 - mycroft.skills.core:wrapper:608 - ERROR - An error occurred while processing a request in Pianobar Skill
Traceback (most recent call last):
File “/usr/local/lib/python2.7/site-packages/mycroft_core-18.2.3-py2.7.egg/mycroft/skills/core.py”, line 599, in wrapper
handler(message)
File “/opt/mycroft/skills/pianobar-skill/init.py”, line 412, in play_pandora
self._play_station(station, dialog)
File “/opt/mycroft/skills/pianobar-skill/init.py”, line 386, in _play_station
self.process.stdin.write(“0\n”)
AttributeError: ‘NoneType’ object has no attribute ‘stdin’”


#7

Also having the same issue


#8

Is there going to be any resolution on this? I just installed the Pandora skill and it is still having these same symptoms, is there not any development on this project anymore?


#9

@ethanward looks to be the original developer, the GitHub indicates there was some work done within the last couple weeks. Just speculating but may require changes for the Python 3.4 update.
Good Luck.


#10

I still get the “Pandora filed to load …” error when i say “play pandora”
. My account information in settings.json is correct. Has there been any resolution to this problem?


#11

Hi @dave, thanks for raising the question around this one.

The pianobar-skill, which plays Pandora, has been updated within the last month;
https://market.mycroft.ai/skill/mycroft-pandora

Are you on the latest version?

Are there any pandora or pianobar errors in your skills.log?
Your skills.log can be found at /var/log/mycroft/skills.

Best, Kathy


#12

Hi Kathy,

Here’s the log:

22:37:12.222 - mycroft-pandora_mycroftai:_launch_pianobar_process:350 - ERROR -
Failed to connect to Pandora
Traceback (most recent call last):
File “/opt/mycroft/skills/mycroft-pandora.mycroftai/init.py”, line 347, in
_launch_pianobar_process
self._load_current_info()
File “/opt/mycroft/skills/mycroft-pandora.mycroftai/init.py”, line 309, in
_load_current_info
info = json.load(f)
File “/usr/lib/python3.4/json/init.py”, line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File “/usr/lib/python3.4/json/init.py”, line 318, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.4/json/decoder.py”, line 343, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.4/json/decoder.py”, line 361, in raw_decode
raise ValueError(errmsg(“Expecting value”, s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)
22:37:12.248 - SKILLS - DEBUG - {“type”: “speak”, “data”: {“utterance”: “Pandora
failed to load. Please verify your email and password at home.mycroft.ai”, “ex
pect_response”: false}, “context”: {}}

In trying to do my own debugging, I noted that pianobar was not running and I tried to start it manually from the pi account:

pi@picroft:~ $ sudo cp -R …/mycroft/.config/pianobar .config
pi@picroft:~ $ pianobar
Welcome to pianobar (2014.06.08)! Press ? for a list of commands.
(i) Login… Network error: TLS fingerprint mismatch.
pi@picroft:~ $

The username and password in pianobar/config look OK. The TLS fingerprint is:

tls_fingerprint = b’04CA9EE77D1C3198CCA0906A358DB23CE16C8AAE\n’

Any further help would be appreciated.

Cheers,

… Dave Schwab

P.S. I needed to use my @umich.edu email account to sign up for the Mycroft forum because it wouldn’t accept my preferred email (david.schwab.email@gmail.com) as a valid email address.