Mycodo installer sc...
 
Notifications
Clear all

[Solved] Mycodo installer script on fresh default installation of raspbian buster fails to detect failure of necessary modules? mycodo daemon unstartable  

  RSS

tico
 tico
(@tico)
Trusted Member
Joined: 3 months ago
Posts: 65
July 14, 2020 5:21 pm  

Hi -- I just got a second RPi 4B so I can troubleshoot issues with sensors and relays without having to take my other pi offline, and I'm having problems getting Mycodo to install on it correctly.

It's just been formatted with a default install of raspbian buster, and after running the mycodo installer script as described on github, it installs a bunch of components but also doesn't detect failed modules and ultimately doesn't install a working version of Mycodo, though the script finishes with the message that it was installed correctly.

setup.log is attached.

Looks like it fails to build bcrypt, I get an error about

Exception: Version mismatch: this is the 'cffi' package version 1.14.0, located in '/tmp/pip-build-env-4213_hld/overlay/lib/python3.7/site-packages/cffi/api.py'. When we import the top-level '_cffi_backend' extension module, we get version 1.12.2, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-37m-arm-linux-gnueabihf.so'. The two versions should be equal; check your installation.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pi/Mycodo/env/bin/python /home/pi/Mycodo/env/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py

 

and then it goes downhill from there. Any thoughts @kylegabriel ? I made sure raspbian was updated before beginning the install, and apt-get upgrade shows nothing needed installing.

(and my /etc/apt/sources.list contains: "deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi")

This topic was modified 4 weeks ago by tico

Quote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 6 years ago
Posts: 275
July 14, 2020 5:27 pm  

I don't see an attachment. Are you using the Raspberry Pi OS lite image? 

Mycodo Developer


ReplyQuote
tico
 tico
(@tico)
Trusted Member
Joined: 3 months ago
Posts: 65
July 14, 2020 5:31 pm  

Sorry-- i was trying to edit more details into the first post and missed your reply and the attachment too.


ReplyQuote
tico
 tico
(@tico)
Trusted Member
Joined: 3 months ago
Posts: 65
July 14, 2020 5:33 pm  

trying to attach again -- the attachment button said that the filetype isn't allowed so i had to change it to .txt

This post was modified 4 weeks ago by tico

ReplyQuote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 6 years ago
Posts: 275
July 14, 2020 5:38 pm  

Looks like this is the error that's preventing bcrypt from installing:

Exception: Version mismatch: this is the 'cffi' package version 1.14.0, located in '/tmp/pip-build-env-4213_hld/overlay/lib/python3.7/site-packages/cffi/api.py'. When we import the top-level '_cffi_backend' extension module, we get version 1.12.2, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-37m-arm-linux-gnueabihf.so'. The two versions should be equal; check your installation.

Mycodo Developer


ReplyQuote
tico
 tico
(@tico)
Trusted Member
Joined: 3 months ago
Posts: 65
July 14, 2020 5:40 pm  

Oh, and I believe it was Lite installation, but I don't recall for sure and at this location I don't have a screen that I can connect to the Pi itself to check. Is a lite install a problem?

 


ReplyQuote
tico
 tico
(@tico)
Trusted Member
Joined: 3 months ago
Posts: 65
July 14, 2020 5:48 pm  

well it looks like that's the latest version in the raspbian packages for buster currently?

$ dpkg -l | grep cffi
ii python-cffi-backend 1.12.2-1 armhf Foreign Function Interface for Python calling C code - backend
ii python3-cffi-backend 1.12.2-1 armhf Foreign Function Interface for Python 3 calling C code - runtime

$ sudo apt-get update && sudo apt-cache show python3-cffi-backend
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists... Done
Package: python3-cffi-backend
Source: python-cffi
Version: 1.12.2-1
Architecture: armhf
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Installed-Size: 169
Depends: python3 (<< 3.8), python3 (>= 3.7~), libc6 (>= 2.4), libffi6 (>= 3.0.4)
Breaks: python3-cffi (<< 1)
Replaces: python3-cffi (<< 1)
Provides: python3-cffi-backend-api-9729, python3-cffi-backend-api-max (= 10495), python3-cffi-backend-api-min (= 9729)
Homepage: http://cffi.readthedocs.org/
Priority: optional
Section: python
Filename: pool/main/p/python-cffi/python3-cffi-backend_1.12.2-1_armhf.deb


ReplyQuote
tico
 tico
(@tico)
Trusted Member
Joined: 3 months ago
Posts: 65
July 14, 2020 5:51 pm  

 I removed those packages, and I'm rerunning the installer script now

 


ReplyQuote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 6 years ago
Posts: 275
July 14, 2020 5:59 pm  

I neither have python-cffi-backend nor python3-cffi-backend installed on my Buster Lite install (I only use the Lite version). It's likely the result of it being the Desktop version.

Mycodo Developer


ReplyQuote
tico
 tico
(@tico)
Trusted Member
Joined: 3 months ago
Posts: 65
July 14, 2020 6:05 pm  

Hm, I guess it was a Desktop install then -- it was installed the other day when I had access to an HDMI-capable monitor.

Anyhow, that seems to have fixed it!

$ sudo apt-get remove python3-cffi-backend

....

$ sudo /bin/bash /home/pi/Mycodo/install/setup.sh

and after a few moments I'm able to login to the mycodo web interface. Thanks again for your time! Perhaps a note about this issue could be added to the installation instructions in case others happen to run into this ?


ReplyQuote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 6 years ago
Posts: 275
July 14, 2020 6:12 pm  

Already made a commit that will be live in the next release! Thanks for the help figuring it out.

Mycodo Developer


ReplyQuote
tico
 tico
(@tico)
Trusted Member
Joined: 3 months ago
Posts: 65
July 14, 2020 6:41 pm  

Awesome! Thanks a bunch for  *your* help! 

Also, btw, on an unrelated note -- that BME680 sensor that we were troubleshooting a few weeks ago apparently has recently died or gotten internally locked up in some way, such that it constantly reports -131.09 °C  and 100% humidity, even after power cycling and checking the connections. I may get another BME680 (or 280) because when it *did* work it seemed much more responsive to changes in humidity than the SHT31. Have you run across issues with humidity sensors dying in such a fashion? I can't imagine it could have been static electricity in such a humid environment as a grow room..


ReplyQuote
carboncycle
(@carboncycle)
Eminent Member
Joined: 9 months ago
Posts: 22
July 28, 2020 11:24 pm  

If you have condensing humidity, i.e. surface temps dip below the dew point - you are gonna have a bad day.  That sort of environment is why the AM2315 has that nifty brass screen around the sensor.  You can get the SHT31 with the certain cover that makes it more robust - but for most folks I would really recommend the AM2315 probe - mostly because of the design for real world problems - like condensation.


ReplyQuote