timothybrown / BSEC-Conduit

A first class Systemd process which acts as a conduit between between BSEC Library and MQTT.
MIT License
13 stars 11 forks source link

ImportError: cannot import name 'journal' from 'systemd' #8

Open ferazambuja opened 4 years ago

ferazambuja commented 4 years ago

Followed the steps, however, can't get past this error. Any ideas?

(bsec) pi@raspberrypizero:/opt/bsec $ sudo systemctl start bsec-conduit.service; journalctl -f -u bsec-conduit.service Job for bsec-conduit.service failed because the control process exited with error code. See "systemctl status bsec-conduit.service" and "journalctl -xe" for details. -- Logs begin at Sat 2019-11-02 22:17:02 GMT. -- Nov 02 23:49:09 raspberrypizero systemd[1]: bsec-conduit.service: Succeeded. Nov 02 23:49:09 raspberrypizero systemd[1]: Stopped BSEC-Conduit Daemon. Nov 02 23:55:58 raspberrypizero systemd[1]: Starting BSEC-Conduit Daemon... Nov 02 23:55:59 raspberrypizero python3[782]: Traceback (most recent call last): Nov 02 23:55:59 raspberrypizero python3[782]: File "/opt/bsec/bsec-conduit", line 37, in Nov 02 23:55:59 raspberrypizero python3[782]: from systemd import journal Nov 02 23:55:59 raspberrypizero python3[782]: ImportError: cannot import name 'journal' from 'systemd' (/home/pi/.local/lib/python3.7/site-packages/systemd/init.py) Nov 02 23:56:00 raspberrypizero systemd[1]: bsec-conduit.service: Main process exited, code=exited, status=1/FAILURE Nov 02 23:56:00 raspberrypizero systemd[1]: bsec-conduit.service: Failed with result 'exit-code'. Nov 02 23:56:00 raspberrypizero systemd[1]: Failed to start BSEC-Conduit Daemon. Nov 02 23:56:05 raspberrypizero systemd[1]: bsec-conduit.service: Service RestartSec=5s expired, scheduling restart. Nov 02 23:56:05 raspberrypizero systemd[1]: bsec-conduit.service: Scheduled restart job, restart counter is at 1. Nov 02 23:56:05 raspberrypizero systemd[1]: Stopped BSEC-Conduit Daemon.

badstraw360 commented 4 years ago

It has something to do with venv, try this sudo apt-get install python3.6-venv It worked for me and I was getting the same error.