Git Product home page Git Product logo

Comments (12)

jordandrako avatar jordandrako commented on April 28, 2024

This is the result of

cd ~/voice-recognizer-raspi
ls -l
id
 ✝  ~/voice-recognizer-raspi   master  ls -l
total 64
drwxr-xr-x 2 pi pi  4096 May 10 09:11 checkpoints
drwxr-xr-x 2 pi pi  4096 May 10 09:11 config
-rw-r--r-- 1 pi pi   985 May 10 09:11 CONTRIBUTING.md
drwxr-xr-x 5 pi pi  4096 May 10 09:13 env
-rw-r--r-- 1 pi pi  1760 May 10 09:11 HACKING.md
-rw-r--r-- 1 pi pi 11358 May 10 09:11 LICENSE
-rw-r--r-- 1 pi pi   363 May 10 09:11 Makefile
drwxr-xr-x 3 pi pi  4096 May 10 09:11 po
-rw-r--r-- 1 pi pi   282 May 10 09:11 README.md
drwxr-xr-x 2 pi pi  4096 May 10 09:11 scripts
drwxr-xr-x 2 pi pi  4096 May 10 09:11 shortcuts
drwxr-xr-x 4 pi pi  4096 May 10 09:17 src
drwxr-xr-x 2 pi pi  4096 May 10 09:11 systemd
drwxr-xr-x 2 pi pi  4096 May 10 09:11 tests
 ✝  ~/voice-recognizer-raspi   master  id
uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),101(input),108(netdev),997(gpio),998(i2c),999(spi),1001(homeassistant)

from aiyprojects-raspbian.

drigz avatar drigz commented on April 28, 2024

Thanks for the report! @jordandrako, what operating system are you using?

@ensonic, do you think we should fall back to /tmp or somewhere else if /run/user doesn't exist? The status-monitor would need to check for both too.

from aiyprojects-raspbian.

jordandrako avatar jordandrako commented on April 28, 2024

I'm running a modified version of raspbian called hassbian.

from aiyprojects-raspbian.

jordandrako avatar jordandrako commented on April 28, 2024

There is also a dependency issue when running main.py. It asks for PySocks, and using pip install PySocks in the venv makes it go away.

from aiyprojects-raspbian.

ensonic avatar ensonic commented on April 28, 2024

@drigz yeah, probably /tmp even though it is not meant for that.

@jordandrako can you let us know how your /run dir looks like?

from aiyprojects-raspbian.

jordandrako avatar jordandrako commented on April 28, 2024
total 44K
drwxr-xr-x 23 root        root         800 May 10 09:18 .
drwxr-xr-x 22 root        root        4.0K Apr 21 22:14 ..
drwxr-xr-x  2 avahi       avahi         80 May 10 09:17 avahi-daemon
-rw-r--r--  1 root        root           4 May 10 09:17 crond.pid
----------  1 root        root           0 May 10 09:17 crond.reboot
drwxr-xr-x  2 root        root          60 May 10 09:17 dbus
drwxr-xr-x  3 root        root         100 May 10 09:17 dhcpcd
-rw-r--r--  1 root        root           4 May 10 09:17 dhcpcd.pid
srw-rw----  1 root        root           0 May 10 09:17 dhcpcd.sock
srw-rw-rw-  1 root        root           0 May 10 09:17 dhcpcd.unpriv.sock
drwxr-xr-x  2 root        root          60 May 10 09:17 dnsmasq
drwxr-x---  2 Debian-exim Debian-exim   60 May 10 09:18 exim4
prw-------  1 root        root           0 May 10 09:17 hogsuspend
lrwxrwxrwx  1 root        root          25 May 10 09:17 initctl -> /run/systemd/initctl/fifo
drwxrwxrwt  4 root        root         100 May 10 09:17 lock
drwxr-xr-x  3 root        root          60 May 10 09:17 log
-rw-r--r--  1 root        root           4 May 10 09:17 mosquitto.pid
drwxr-xr-x  2 root        root          60 May 10 09:17 mount
drwxr-xr-x  2 mysql       root          80 May 10 09:17 mysqld
drwxr-xr-x  2 root        netdev        80 May 10 09:17 network
-rw-r--r--  1 root        root           3 May 10 09:17 ntpd.pid
drwxr-xr-x  2 root        root          40 May 10 09:17 plymouth
drwxr-xr-x  4 root        root          80 May 10 09:17 resolvconf
-rw-r--r--  1 root        root           4 May 10 09:17 rngd.pid
-rw-r--r--  1 root        root           4 May 10 09:17 rsyslogd.pid
drwxr-xr-x  2 root        root          60 May 10 09:17 sendsigs.omit.d
lrwxrwxrwx  1 root        root           8 May 10 09:17 shm -> /dev/shm
drwxr-xr-x  2 root        root          60 May 10 09:17 snapclient
drwxr-xr-x  2 root        root          60 May 10 09:17 snapserver
drwxr-xr-x  2 root        root          40 May 10 09:17 sshd
-rw-r--r--  1 root        root           4 May 10 09:17 sshd.pid
drwxr-xr-x 15 root        root         360 May 10 09:17 systemd
-rw-r--r--  1 root        root           4 May 10 09:17 thd.pid
srwxr-xr-x  1 root        root           0 May 10 09:17 thd.socket
drwxr-xr-x  2 root        root          60 Dec 31  1969 tmpfiles.d
drwxr-xr-x  7 root        root         160 May 10 09:17 udev
drwxr-xr-x  2 root        root          40 May 10 09:17 user
-rw-rw-r--  1 root        utmp        1.5K May 10 09:18 utmp
drwxr-x---  2 root        netdev        60 May 10 09:17 wpa_supplicant
-rw-r--r--  1 root        root           4 May 10 09:17 wpa_supplicant.wlan0.pid

There is nothing in the /run/user directory.

from aiyprojects-raspbian.

ensonic avatar ensonic commented on April 28, 2024

Ahh, so there is /run/user. Could you please also run:

ls -al  /run/user

and

id

Thanks!

from aiyprojects-raspbian.

jordandrako avatar jordandrako commented on April 28, 2024

Nothing there

total 0
drwxr-xr-x  2 root root  40 May 10 09:17 .
drwxr-xr-x 23 root root 800 May 10 09:18 ..

from aiyprojects-raspbian.

ensonic avatar ensonic commented on April 28, 2024

Okay, it is just missing the subdir for the user-id, which only root could create :/

from aiyprojects-raspbian.

jordandrako avatar jordandrako commented on April 28, 2024

I can create the directory myself to get it to run, does it need to be owned by pi?

from aiyprojects-raspbian.

jordandrako avatar jordandrako commented on April 28, 2024

I created the 1000 directory under /run/user and made pi the owner. Now running src/main.py gives this traceback:

Traceback (most recent call last):
  File "src/main.py", line 302, in <module>
    main()
  File "src/main.py", line 159, in main
    do_recognition(args, recorder, recognizer, player)
  File "src/main.py", line 175, in do_recognition
    import triggers.gpio
  File "/home/pi/voice-recognizer-raspi/src/triggers/gpio.py", line 19, in <module>
    import RPi.GPIO as GPIO
ImportError: No module named 'RPi'

I then ran

pip install Rpi.GPIO

Now the result of src/main.py is:

[2017-05-10 10:48:41,639] INFO:audio:started recording

This is the desired behavior, yes?

from aiyprojects-raspbian.

jordandrako avatar jordandrako commented on April 28, 2024

Hmm. I also had to install Rpi.GPIO outside the for the status-led.service.

sudo python3 -m pip install Rpi.GPIO

After that I rebooted, which I found out deleted the /run/user/1000 directory, so I had recreate, and re chown that. Then I restarted all the services and it seems to work.

from aiyprojects-raspbian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.