New Picroft build fails to load

Hi there,

I recently reinstalled Picroft on my RaspberryPi 3. Upon startup I get the following error when the CLI initializes.

The pi doesn’t progress beyond this point… what should I do?

Derek

███╗ ███╗██╗ ██╗ ██████╗██████╗ ██████╗ ███████╗████████╗
████╗ ████║╚██╗ ██╔╝██╔════╝██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝
██╔████╔██║ ╚████╔╝ ██║ ██████╔╝██║ ██║█████╗ ██║
██║╚██╔╝██║ ╚██╔╝ ██║ ██╔══██╗██║ ██║██╔══╝ ██║
██║ ╚═╝ ██║ ██║ ╚██████╗██║ ██║╚██████╔╝██║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝

    _____    _                          __   _   
   |  __ \  (_)                        / _| | |  
   | |__) |  _    ___   _ __    ___   | |_  | |_ 
   |  ___/  | |  / __| | '__|  / _ \  |  _| | __|
   | |      | | | (__  | |    | (_) | | |   | |_ 
   |_|      |_|  \___| |_|     \___/  |_|    \__|

Traceback (most recent call last):
File “”, line 1, in
File “/home/pi/mycroft-core/mycroft/init.py”, line 17, in
from mycroft.api import Api
File “/home/pi/mycroft-core/mycroft/api/init.py”, line 23, in
from mycroft.configuration import Configuration
File “/home/pi/mycroft-core/mycroft/configuration/init.py”, line 15, in
from .config import Configuration, LocalConf, RemoteConf
File “/home/pi/mycroft-core/mycroft/configuration/config.py”, line 23, in
from mycroft.util.json_helper import load_commented_json, merge_dict
File “/home/pi/mycroft-core/mycroft/util/init.py”, line 32, in
import mycroft.audio
File “/home/pi/mycroft-core/mycroft/audio/init.py”, line 17, in
from mycroft.util.signal import check_for_signal, create_signal
File “/home/pi/mycroft-core/mycroft/util/signal.py”, line 22, in
from mycroft.util.log import LOG
File “/home/pi/mycroft-core/mycroft/util/log.py”, line 116, in
LOG.init()
File “/home/pi/mycroft-core/mycroft/util/log.py”, line 69, in init
load_commented_json(conf) if isfile(conf) else {})
File “/home/pi/mycroft-core/mycroft/util/json_helper.py”, line 55, in load_commented_json
return json.loads(uncomment_json(contents))
File “/usr/lib/python3.5/json/init.py”, line 319, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.5/json/decoder.py”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.5/json/decoder.py”, line 357, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Looks like an error in either: /etc/mycroft/mycroft.conf or ~/.mycroft/mycroft.conf

Perhaps you missed a comma at the end of a line or something. Post the content of the files if you do not see it and we can help you out.

Agree with @j1nx on this one, double check your mycroft.conf file, and see whether it is valid JSON.

Hi folks! Sorry for the delay. Here is mycroft.conf, as it just downloaded.

   {
   "play_wav_cmdline": "aplay -Dhw:0,0 %1",
   "play_mp3_cmdline": "mpg123 -a hw:0,0 %1",
   "enclosure": {
      "platform": "picroft"
   },
   "tts": {
      "mimic": {
         "path": "/home/pi/mycroft-core/mimic/bin/mimic"
      }
   },
   "ipc_path": "/ramdisk/mycroft/ipc/"
}

That’s not valid JSON - it’s missing an opening curly brace { on the first line, to match with the last curly brace on the last line.

Hi Kathy,

The indent for the “{” is indented further, but it’s there. By my count there are four “{” and four “}”, and each of them is enclosed correctly. Its strange, too, because I haven’t modified this file - it’s directly from stock picroft. I’ll redownload see if the error resolves…

That is the conf from /etc/mycroft but what about the one within; ~/.mycroft ?

huh. It appears to be completely blank. What should it say?

I believe at least mycroft’s version number. Try stopping mycroft and delete the file.

Good pick up, and apologies for setting you on the wrong path.

As a comparison, my ~/.mycroft.conf (from Linux, my Pi is in a non-functioning state, haven’t had a chance to reimage it) is;

kathyreid@kathyreid-Oryx-Pro:~/.mycroft$ cat mycroft.conf
{"precise": {"dist_url": "http://bootstrap.mycroft.ai/artifacts/static/daily/"}, "hotwords": {"hey mycroft": {"module": "pocketsphinx"}}, "max_allowed_core_version": 18.8, "confirm_listening": true}

I tried debugging the issue using these instructions and found that pulseaudio wasn’t installed. Installing it has gotten me further and the device is working.

1 Like

I too have had a frustrating time with the Sept. Picroft build. I tried many things suggested in the forums and had it partially working, but with no control over the volume (always maximum volume).
I decided to reflash the image last week (hoping it had been updated, but alas, no) and found the same link that DerekCaelin did and still had to try numerous things to make it finally work with volume control functional. Frankly, there were so many things I tried I lost track and am sure I couldn’t replicate it if I had to.
Now it is working well except the volume starts at minimum when rebooted – that is an easy workaround. :slight_smile:

It would be helpful to have the Picroft build updated so it functions properly without all the hacking required.

That’s exactly our challenge, @gadgetguy - because there are so many variations with microphones and speakers, it’s very difficult for the Picroft build to be able to cater for all the combinations. The September build is also the first build of Jessie Stretch - which made considerable changes to the way audio works too :wink:

This is why on this release the menu was implemented - to try and take away some of the complexity. We of course will try and make this better over time, but we’re dependent on the Community for your feedback and assistance in this.