No rflib.py

158 views
Skip to first unread message

solstic...@gmail.com

unread,
Oct 17, 2022, 11:00:51 AM10/17/22
to PrivateEyePi
Hi,

1. I don't know if I miss something obvious here, but when I run ./rfsensor.py, I got an error:

./rfsensor.py
Traceback (most recent call last):
  File "/root/pep/./rfsensor.py", line 47, in <module>
    from rflib import rf2serial
ModuleNotFoundError: No module named 'rflib'

and there seem to be no rflib.py in the pep_python3.zip file.

2. Also, some files use CRLF ending, so running, for example, ./rfsensor.py fails with 
/usr/bin/env: 'python\r': No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines

I had to convert the files to unix format with dos2unix.

3. And some script depends on RPi.GPIO so this could be installed by the isntall.sh sript with
sudo apt install python3-rpi.gpio

Glenn Seaton

unread,
Nov 1, 2022, 10:12:15 PM11/1/22
to PrivateEyePi
hi,
Sorry no one has answered sooner, I am reviewing the distribution of our software applications and see the problem.
We are going to merge all the app packages into one complete github download. 
Until then, to get the tools you need, in the folder with the other apps enter

That should pull and install the missing tools.
If git is not installed, type sudo apt install git -y

Hope that helps.

Glenn

Glenn Seaton

unread,
Nov 11, 2022, 11:42:42 PM11/11/22
to PrivateEyePi
The download .zip file has been updated to include rflib.py

solstic...@gmail.com

unread,
Nov 26, 2022, 12:06:26 AM11/26/22
to PrivateEyePi
There is some problem with bme280 module, that cause errors, when simply trying to run rfsensor.py

# ./rfsensor.py
 
Traceback (most recent call last):
  File "./pep/./rfsensor.py", line 47, in <module>
    from rflib import rf2serial
  File "/root/pep/rflib.py", line 8, in <module>
    from bme280 import process_bme_reading
ImportError: cannot import name 'process_bme_reading' from 'bme280' (/usr/lib/python3.10/site-packages/bme280/__init__.py)
 
using python-bme280-0.2.4-3
There seem to be a new API and the process_bme_reading function does not exist anymore. I think it is replace by sample.
And the object returned by that new function, does not have the same attribute name that the previous one
If I read correctly they are temprature, pressure and humidity, now.


solstic...@gmail.com

unread,
Nov 29, 2022, 10:10:47 AM11/29/22
to PrivateEyePi

oh it seems there is a bme280 module that is shipped with rf_tools.git. I think that module is missing too.

Otherwise, rflib.py needs to rewritten to be able to use upstream/official bme280 module (0.2.4) like I said

Joel Nordahl

unread,
Jan 25, 2024, 3:20:21 PMJan 25
to PrivateEyePi
Any news on this problem? Having the same problem. 

Traceback (most recent call last):
  File "/home/pi/git/rfsensor.py", line 47, in <module>
    from rflib import rf2serial
  File "/home/pi/git/rflib.py", line 8, in <module>
    from bme280 import process_bme_reading
ImportError: cannot import name 'process_bme_reading' from 'bme280' (/usr/lib/python3/dist-packages/bme280/__init__.py)

Nigel S

unread,
Jan 25, 2024, 5:57:51 PMJan 25
to PrivateEyePi
Joel, this error is slightly different than in your 1st message, and is the exact message I got when the bme280.py and bme280.pyc were not in the same directory as rfsensor.py.  I fixed it by copying those 2 files from rf_tools to the same directory as rfsensor.py
Reply all
Reply to author
Forward
0 new messages