FWIW, you can still use python2 with weewx4 if you are using the ‘setup.py’ installation method.
If you are on a relatively recent debian version using the apt-get packages, those will default to python3 in weewx v4, so you’ll need all your extensions and drivers to be python3 compliant.
New user of WeeWx and Weatherflow. Installed on Ubuntu 18.04 and I’m getting this error, Any ideas?
May 7 13:20:03 bs-medianuc weewx[20711] INFO weewx.engine: Starting main packet loop.
May 7 13:20:03 bs-medianuc /weewxd: weatherflowudp: MainThread: Listening for UDP broadcasts to IP address on port 50222, with timeout 90 and share_socket False…
May 7 13:20:05 bs-medianuc dhcpd[2365]: DHCPREQUEST for 172.17.18.103 from 70:f1:1c:05:0e:1e (gogogate) via eno1
May 7 13:20:05 bs-medianuc dhcpd[2365]: DHCPACK on 172.17.18.103 to 70:f1:1c:05:0e:1e (gogogate) via eno1
May 7 13:20:06 bs-medianuc weewx[20711] INFO weewx.engine: Main loop exiting. Shutting engine down.
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: Caught unrecoverable exception:
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** a bytes-like object is required, not ‘str’
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** Traceback (most recent call last):
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** File “/home/weewx/bin/weewxd”, line 154, in main
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** engine.run()
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** File “/home/weewx/bin/weewx/engine.py”, line 188, in run
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** for packet in self.console.genLoopPackets():
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** File “/home/weewx/bin/user/weatherflowudp.py”, line 295, in genLoopPackets
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** m0 = m[0].replace(",null",",None")
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** TypeError: a bytes-like object is required, not ‘str’
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** Exiting.
shortly after starting, I nuked python3 and reinstalled weewx and the udp driver and I’m functional now. I may attempt installing on a RPi in the next day or so with Python3
You can always go to v4 and still run python2.7 and you’ll be fine. You can switch to python3 when all the drivers and extensions you use are updated. No rush.
FYI, I am finishing up the Tempest-specific docs for the driver now, since WF officially published the new UDP API for it. (Thanks, @corrineb!) I’ll be pushing it up to GitHub in a day or so…
Hi everyone - I’ve got a problem, and I think it might be with my conf file but not sure and would like some advice. I got WeeWx to work perfect with the Simulator (I see the results in the terminal when I run it manually, and it creates the html files fine). I then installed the WeatherFlowUDP driver, which seemed to be successful, and edited my conf file based on the sample. Basically I copied/pasted and changed the Station ID in the sample to my Station ID, and set the conf file to use it. (I tried manually updating it, and also rebuilt it with the reconfigurations function in case I messed something up, but get the same config file both ways.) When I run WeeWx with the WF driver, I don’t get any results, and when I look at the log file, I see this error: “OSError: [Errno 49] Can’t assign requested address”
weewx[40916] INFO __main__: Initializing weewx version 4.1.1
weewx[40916] INFO __main__: Using Python 3.7.3 (default, Apr 24 2020, 18:51:23)
[Clang 11.0.3 (clang-1103.0.32.62)]
weewx[40916] INFO __main__: Platform Darwin-19.5.0-x86_64-i386-64bit
weewx[40916] INFO __main__: Locale is 'en_US.UTF-8'
weewx[40916] INFO __main__: Using configuration file weewx.conf
weewx[40916] INFO __main__: Debug is 0
weewx[40916] INFO weewx.engine: Loading station type WeatherFlowUDP (user.weatherflowudp)
weewx[40916] INFO weewx.engine: StdConvert target unit is 0x1
weewx[40916] INFO weewx.wxservices: The following values will be calculated: pressure=prefer_hardware, altimeter=prefer_hardware, appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, rainRate=prefer_hardware, windchill=prefer_hardware, windrun=prefer_hardware
weewx[40916] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
weewx[40916] INFO weewx.engine: Archive will use data binding wx_binding
weewx[40916] INFO weewx.engine: Record generation will be attempted in 'hardware'
weewx[40916] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
weewx[40916] INFO weewx.restx: StationRegistry: Station will be registered.
weewx[40916] INFO weewx.restx: Wunderground: Posting not enabled.
weewx[40916] INFO weewx.restx: PWSweather: Posting not enabled.
weewx[40916] INFO weewx.restx: CWOP: Posting not enabled.
weewx[40916] INFO weewx.restx: WOW: Posting not enabled.
weewx[40916] INFO weewx.restx: AWEKAS: Posting not enabled.
weewx[40916] INFO __main__: Starting up weewx version 4.1.1
weewx[40916] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
weewx[40916] INFO weewx.manager: Starting backfill of daily summaries
weewx[40916] INFO weewx.engine: Starting main packet loop.
weewx[40916] INFO weewx.engine: Main loop exiting. Shutting engine down.
weewx[40916] CRITICAL __main__: Caught OSError: [Errno 49] Can't assign requested address
weewx[40916] CRITICAL __main__: **** Traceback (most recent call last):
weewx[40916] CRITICAL __main__: **** File "./bin/weewxd", line 154, in main
weewx[40916] CRITICAL __main__: **** engine.run()
weewx[40916] CRITICAL __main__: **** File "/Users/Mini/weewx/current/bin/weewx/engine.py", line 188, in run
weewx[40916] CRITICAL __main__: **** for packet in self.console.genLoopPackets():
weewx[40916] CRITICAL __main__: **** File "/Users/Mini/weewx/current/bin/user/weatherflowudp.py", line 298, in genLoopPackets
weewx[40916] CRITICAL __main__: **** s.bind((self._udp_address,self._udp_port))
weewx[40916] CRITICAL __main__: **** OSError: [Errno 49] Can't assign requested address
weewx[40916] CRITICAL __main__: **** Waiting 10 seconds then retrying...
My config file is weewx.conf.txt (22.9 KB) (.txt added to get the file to upload here)