enviroplus-python
enviroplus-python copied to clipboard
light.py sample fails to run on new Enviro+
Just reiceived a new Enviro+. Most of the sample seem to run, so the module is working, but the light.py sample does not. It produces this error on startup
:~/Pimoroni/enviroplus/examples $ pi@x1:~/Pimoroni/enviroplus/examples $ python3 light.py
Traceback (most recent call last):
File "/home/pi/Pimoroni/enviroplus/examples/light.py", line 7, in
i2c seems enabled and the 23, which I belive is the sensor is there
1:~/Pimoroni/enviroplus/examples $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Further testing shows anything using the light sensor, all-in-one, or weather-and-light provides the same error.
Traceback (most recent call last):
File "/home/pi/Pimoroni/enviroplus/examples/all-in-one.py", line 9, in
Any ideas what I am doing wrong? Pi is up to date (and fresh) install of NOOBS. I used the one-line install for the samples.
Thanks.
Weird - what does pip list show - is ltr559 in there?
This is working for me, but it is some time since I installed things...
You can also run python ./check-install.py which should show you if any dependencies are missing.
The ValueError: bad marshal data (unknown type code) seems to be the crux of the issue?
I've not come across this before, but it suggests corruption in the .pyc files and might suggest a wider system issue.
Try reinstalling the library with sudo python3 -m pip install --upgrade --force-reinstall ltr559
Closing as old/stale, but let us know if you're still having issues.