Unable to load driver: int() can't convert non-string with explicit base

68 views
Skip to first unread message

Laurent Lasne

unread,
Sep 20, 2019, 1:05:56 PM9/20/19
to weewx-user
Hi Everyone,

Weather station : Raspberry pi3, running Raspbian buster
Driver for weewx: jardiamj/BYOWS_RPi
                           
Tutorial             : Build your own weather station_Raspberry pi project   (Uploading data to weather underground)


     After getting my station up and running perfectly using the python3 code from the tutorial: SQLite, all sensors reading and upload to weather underground, I decided to give a go to weewx, but I have an issue. When I start weewx manually 
sudo weewxd /etc/weewx/weewx.conf

I got that in my /var/log/Syslog when debug = 1 in  : weewx.conf
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Initializing weewx version 3.9.2
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Using Python 2.7.16 (default, Apr  6 2019, 01:42:57) #012[GCC 8.2.0]
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Platform Linux-4.19.66-v7+-armv7l-with-debian-10.1
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Locale is 'en_GB.UTF-8'
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Using configuration file /etc/weewx/weewx.conf
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Debug is 1
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Initializing engine
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Loading station type BYOWS (user.byows_rpi)
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Import of driver failed: int() can't convert non-string with explicit base (<type 'exceptions.TypeError'>)
Sep 20 11:17:52 raspberrypi weewx[4040]: engine: Unable to load driver: int() can't convert non-string with explicit base
Sep 20 11:17:52 raspberrypi weewx[4040]:     ****  Exiting...

I know that wiring is ok because working with python3
I did reinstall libraries for python 2.7 
I made some research but come empty-handed
I am not a programmer, just in learning phase python3 (first language for me).
Not bad knowledge of Linux, Debian ubuntu Knoppix, etc...
I don't know what to do next, I hope I will get help.
 

In addition to the /var/log/syslog I attach weewx.conf and /usr/share/weewx/user

Thank you for your time
weewx.conf
__init__.pyc
byows_rpi.py
extensions.py
byows_rpi.pyc
extensions.pyc
__init__.py

Laurent Lasne

unread,
Sep 21, 2019, 8:31:34 AM9/21/19
to weewx-user
Hi Everybody, just to keep you posted:

My first installation of weewx was made via Debian package
This morning I reinstall weewx via the script

RESULT:
             Same /var/log/Syslog when debug = 1 in  the weewx.conf
                  look bad
I decided to make a fresh installation and see .

Thomas Keffer

unread,
Sep 21, 2019, 9:33:23 AM9/21/19
to weewx-user
I think your problem is a typo in the driver, byows_rpi.py. Change this line

params['bme280_address'] = int(stn_dict.get('bme280_address', 0x77), 16)

to this

params['bme280_address'] = int(stn_dict.get('bme280_address', '0x77'), 16)

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f36c7a2d-e120-43b4-b77d-d61728197659%40googlegroups.com.

Laurent Lasne

unread,
Sep 21, 2019, 1:20:09 PM9/21/19
to weewx-user
Hi, first, Thanks for your help

I did reinstall raspbian buster lite, I reinstall weewx using .deb package, I made the change you suggested then,

Now, my Syslog give me that :

 
Sep 21 18:10:21 weatherstation weewx[902]: engine: Initializing weewx version 3.9.2
Sep 21 18:10:21 weatherstation weewx[902]: engine: Using Python 2.7.16 (default, Apr  6 2019, 01:42:57) #012[GCC 8.2.0]
Sep 21 18:10:21 weatherstation weewx[902]: engine: Platform Linux-4.19.66-v7+-armv7l-with-debian-10.1
Sep 21 18:10:21 weatherstation weewx[902]: engine: Locale is 'en_GB.UTF-8'
Sep 21 18:10:21 weatherstation weewx[902]: engine: Using configuration file /etc/weewx/weewx.conf
Sep 21 18:10:21 weatherstation weewx[902]: engine: Loading station type BYOWS (user.byows_rpi)
Sep 21 18:10:21 weatherstation weewx[902]: BYOWS RPi: using driver BYOWS
Sep 21 18:10:21 weatherstation weewx[902]: BYOWS RPi: driver version is 0.51
Sep 21 18:10:21 weatherstation weewx[902]: engine: Import of driver failed: [Errno 121] Remote I/O error (<type 'exceptions.IOError'>)
Sep 21 18:10:21 weatherstation weewx[902]: engine: Unable to load driver: [Errno 121] Remote I/O error
Sep 21 18:10:21 weatherstation weewx[902]:     ****  Exiting...
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Laurent Lasne

unread,
Sep 21, 2019, 3:21:34 PM9/21/19
to weewx-user
Thomas, you are a Legend, after making the change you suggested to me, I realized that the address was wrong  


params['bme280_address'] = int(stn_dict.get('bme280_address', '0x76'), 16)

Now everything looks to work find, Thank you very much.

On Saturday, 21 September 2019 14:33:23 UTC+1, Thomas Keffer wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages