How can I resolve the error ImportError: cannot import name WebSocketApp
?
Hereās a working Dockerfile for setting up the mycroft-core development environment, in case thereās any other non-Ubuntu users interested. Itās tested with Fedora 23 as the host OS but should work with Mac OS or any Linux distribution.
FROM ubuntu:14.04
# Add mycroft-core dependencies from build_host_setup.sh and curl
RUN apt-get update
RUN sudo apt-get install -y \
git \
python \
python-dev \
python-virtualenv \
python-gobject-dev \
virtualenvwrapper \
libtool \
libffi-dev \
libssl-dev \
autoconf \
bison \
swig \
libglib2.0-dev \
s3cmd \
portaudio19-dev \
mpg123 \
curl
RUN sudo easy_install --upgrade virtualenv
# Get Mycroft Core
RUN git clone https://github.com/MycroftAI/mycroft-core.git
# Make non-root user in container
RUN useradd mycroft -d /mycroft-core && chown -R mycroft /mycroft-core
USER mycroft
# Run dev_setup script as non-root user
WORKDIR mycroft-core
RUN ./dev_setup.sh
Awesome!
Iām going to try this ASAP, thanks!
Great job @Marxau - another community member worked on a Docker file too, but it is still based on the old repo (before we opened up to everyone).
Iāll open it up if you want to head over to it and hit it with a PR.
@Marxau here it is: https://github.com/MycroftAI/docker-mycroft
Letās get it up-to-date! Great work!
I only have time to skim this until I get home, but it looks like the pre-existing dockerfile doesnāt use a python virtualenv. I seriously considered going that route (since container in a container is a bit silly) but decided for the sake of guaranteed compatibility and ease of maintenance to keep it.
If you guys think that having virtualenv + docker works Iāll submit the pull request. Otherwise I can tweak the existing dockerfile, but it might occasionally need to be updated if stuff changes w.r.t. the virtualenv settings.
In terms of skills Iām working on a pair of skills for the Wemo smart switch and motion sensor building on the excellent open source Ouimeaux controller project.
@Marxau Iām very excited to be able to control Wemo. I think that whatever is best for managing the Docker instance, and making it easy to use is probably the best way to go in regards to Virtualenvs. Iām really going to leave this up to you and @paulscott56ās discretion.
I have Mycroft working just fine on a Raspberry 2 running Raspian Jessie-lite. However, Iām having trouble getting Mycroft to connect to UART. Iāve disabled the login console for the pi using raspi-config. Hereās the error message : EnclosureClient - ERROR - It is not possible to connect to serial port: /dev/ttyAMA0. Is there another process using the serial port that I should be disabling? Iāve already tried stopping getty from using the port but to no avail. Can anyone point me in the right direction? I figured Iād take a stab at creating a custom face display for Mycroft.
Hi Gustavo!
(I thought Iād post this reply to your other thread here.)
First of all, does the /dev/ttyAMA0 UART exist? I assume that it does.
Iāve had to disable getty this way:
sudo systemctl stop serial-getty@ttyAMA0.service sudo systemctl disable serial-getty@ttyAMA0.service
The user that runs the enclosure code should also be a member of the dialout
group.
`sudo usermod -aG dialout USERā
I hope that helps!
I actually used this last night to build mycroft on centOS 7.3 which is my primary linux distor of choice, due to being a linux admin in Enterprise envs. I just found out that there is now a gnome plugin which is awesome!
I cant run that. how do it?
Here is a video showing exactly how to do this: https://www.patreon.com/posts/mycroft-training-13979749