Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on WeeWX 4.0.0 #15

Open
hapklaar opened this issue May 12, 2020 · 11 comments
Open

Doesn't work on WeeWX 4.0.0 #15

hapklaar opened this issue May 12, 2020 · 11 comments

Comments

@hapklaar
Copy link

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:

May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: Initializing weewx version 4.0.0
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: Using Python 3.7.3 (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0]
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: Platform Linux-4.19.97-v7+-armv7l-with-debian-10.4
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: Locale is 'en_US.UTF-8'
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: PID file is /var/run/weewx.pid
May 12 23:44:14 HapPiHyper weewx[1000] INFO __main__: Using configuration file /etc/weewx/weewx.conf
May 12 23:44:14 HapPiHyper weewx[1000] INFO weewx.engine: Loading station type netatmo (user.netatmo)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: Caught unrecoverable exception:
May 12 23:44:14 HapPiHyper weewx[1000] 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)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****  Traceback (most recent call last):
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 148, in main
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 69, in __init__
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****      self.setupStation(config_dict)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 92, in setupStation
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****      __import__(driver)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****    File "/usr/share/weewx/user/netatmo.py", line 101
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****      print "Specify the mode for obtaining data, either 'cloud' or 'sniff'"
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****                                                                           ^
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****  SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Specify the mode for obtaining data, either 'cloud' or 'sniff'")?
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__:     ****  Exiting.
May 12 23:44:14 HapPiHyper weewx[984]: Starting weewx weather system: weewx.
May 12 23:44:14 HapPiHyper systemd[1]: Started LSB: weewx weather system.

This is on a Rpi 3 with Buster release and WeeWX installed using these instruction:

   12  wget -qO - http://weewx.com/keys.html | sudo apt-key add -
   13  wget -qO - http://weewx.com/apt/weewx-python3.list | sudo tee /etc/apt/sources.list.d/weewx.list
   14  sudo apt update
   15  sudo apt install weewx
@thk70
Copy link

thk70 commented May 14, 2020

+1
(also issue in Ubuntu 20.04)

@kwalker05
Copy link

kwalker05 commented May 15, 2020

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.

@EcstaticMark
Copy link

Same issue, Ubuntu 20.04 LTS.

@jult
Copy link

jult commented Jun 30, 2020

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.```

@EB5TC
Copy link

EB5TC commented Jul 4, 2020

+1
Not option to choose Netatmo driver after running wee_config --reconfigure
Doesn't works 😢

@bricebou
Copy link

bricebou commented Aug 22, 2020

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 !

@Korvenwin
Copy link

I'm having the same issue. It appears that the project is forgotten. :(

@bricebou
Copy link

bricebou commented Sep 9, 2020

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

bricebou added a commit to bricebou/weewx-netatmo that referenced this issue Nov 12, 2020
@bricebou
Copy link

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

@kwalker05
Copy link

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.

@bricebou
Copy link

bricebou commented Nov 13, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants