Open hapklaar opened 4 years ago
+1 (also issue in Ubuntu 20.04)
I ran into the same issue with a fresh Ubuntu 20.04/WeeWX4 install. Until there's an update, I band-aided using lib2to3 to convert bin/user/netatmo.py to Python3. There was one more edit I had to manually make on line 521 because it was barking about the params being a str; just added .encode("utf-8") after the urlencode.
Same issue, Ubuntu 20.04 LTS.
Same same in Debian 10, still, unfortunately.
Jun 30 10:45:34 sugar weewx[7137] INFO __main__: Using Python 3.7.3 (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0]
Jun 30 10:45:34 sugar weewx[7137] INFO __main__: Platform Linux-4.19.0-9-amd64-x86_64-with-debian-10.4
Jun 30 10:45:34 sugar weewx[7137] INFO __main__: Locale is 'en_US.UTF-8'
Jun 30 10:45:34 sugar weewx[7137] INFO __main__: PID file is /var/run/weewx.pid
Jun 30 10:45:34 sugar weewx[7141] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Jun 30 10:45:34 sugar weewx[7141] INFO __main__: Debug is 0
Jun 30 10:45:34 sugar weewx[7141] INFO weewx.engine: Loading station type netatmo (user.netatmo)
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: Caught unrecoverable exception:
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** Missing parentheses in call to 'print'. Did you mean print("Specify the mode for obtaining data, either 'cloud' or 'sniff'")? (netatmo.py, line 101)
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** Traceback (most recent call last):
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** File "/usr/share/weewx/weewxd", line 148, in main
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** engine = weewx.engine.StdEngine(config_dict)
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 69, in __init__
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** self.setupStation(config_dict)
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 92, in setupStation
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** __import__(driver)
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** File "/usr/share/weewx/user/netatmo.py", line 101
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** print "Specify the mode for obtaining data, either 'cloud' or 'sniff'"
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** ^
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Specify the mode for obtaining data, either 'cloud' or 'sniff'")?
Jun 30 10:45:34 sugar weewx[7141] CRITICAL __main__: **** Exiting.
Jun 30 10:45:34 sugar weewx[7126]: Starting weewx weather system: weewx.
Jun 30 10:45:34 sugar systemd[1]: Started LSB: weewx weather system.```
+1 Not option to choose Netatmo driver after running wee_config --reconfigure Doesn't works 😢
I ran into the same issue with a fresh Ubuntu 20.04/WeeWX4 install. Until there's an update, I band-aided using lib2to3 to convert bin/user/netatmo.py to Python3. There was one more edit I had to manually make on line 521 because it was barking about the params being a str; just added .encode("utf-8") after the urlencode.
Try this workaround but the netatmo driver dosen't show in the drivers list while reconfiguring weewx...
Anyway, I "force" the driver and after some minor modifications with the print statements (parenthesis needed), I have this error:
$ tail -f /var/log/syslog
Aug 22 11:17:01 pidubrac weewx[14274] CRITICAL __main__: **** self.setupStation(config_dict)
Aug 22 11:17:01 pidubrac weewx[14274] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 92, in setupStation
Aug 22 11:17:01 pidubrac weewx[14274] CRITICAL __main__: **** __import__(driver)
Aug 22 11:17:01 pidubrac weewx[14274] CRITICAL __main__: **** File "/usr/share/weewx/user/netatmo.py", line 321
Aug 22 11:17:01 pidubrac weewx[14274] CRITICAL __main__: **** except (socket.error, socket.timeout, urllib2.HTTPError, urllib2.URLError), e:
Aug 22 11:17:01 pidubrac weewx[14274] CRITICAL __main__: **** ^
Aug 22 11:17:01 pidubrac weewx[14274] CRITICAL __main__: **** SyntaxError: invalid syntax
Aug 22 11:17:01 pidubrac weewx[14274] CRITICAL __main__: **** Exiting.
Any idea ? Thanks in advance !
I'm having the same issue. It appears that the project is forgotten. :(
One "solution" is to use the latest 3.x version of WeeWX as described in this post I've wrote (in french) : https://momh.fr/blog/station-meteo-netatmo-and-weewx
Hey ! Using 2to3 tool, I've managed to "upgrade" this netatmo driver to Python 3 and to make it work with weewx 4.*.
Here is the fork I've made : https://github.com/bricebou/weewx-netatmo
Nice. You've done the exact same thing I did back with my May 14th response with lib2to3 and that extra fix.
Why fork versus a pull request? I should have done that at the time, but time was limited.
Hum... My first attempt at using 2to3 was not a success... so I've used a version 3 .9 of WeeWX... I forked because I wasn't sure of what I wanted to achieve... and I'm not really familiar with Git and pull requests... :-/
Installed the driver using the provided instructions, however not option to choose Netatmo driver after running wee_config --reconfigure. When manually setting the driver, the following is shown in syslog:
This is on a Rpi 3 with Buster release and WeeWX installed using these instruction: