Re: [weewx-user] Re: CRITICAL __main__: **** must be real number, not NoneType OR CRITICAL __main__:*** %x formatpe or : an integer is required, not float
Hi Luc, Thanks a lot for your quick action, great! I found v0.20, brand new :) I will update the driver with the following commands on the Rpi - sudo wget -O weewx-rtldavis-master.zip https://github.com/lheijst/weewx-rtldavis/archive/master.zip - sudo ./bin/wee_extension --install weewx-rtldavis-master.zip - sudo ./bin/wee_config --reconfigure --driver=user.rtldavis --no-prompt - reboot is this the procedure or do I miss something? For this update I need to go to the lake (Setup with 4g mobile connection) no remote management. i will report the results. Compliments for your work to make 868Mhz SDR communication possible and thanks again! /Co Op za 2 jan. 2021 om 17:38 schreef Luc Heijst : > Hi Co, > > The error on line 938 occurs when no single message is received from the > Davis station during an archive interval (typical 5 minutes). > The error on line 1200 occurs when data is reveived from an analog > temperature sensor. The 12-bit raw data is converted to 10 bits causing the > integer type to be changed to a float. > (This type of sensor is seldom used with Davis stations.) > > Luc > > Op zaterdag 2 januari 2021 om 10:47:10 UTC-3 schreef covan...@gmail.com: > >> Hi all, >> >> >> >> Ik hope someone can help me to automate errorhandling………. >> >> >> >> The Rpi with SDR (weewx 4.2 / Mysql / apache) runs well, at inexplicable >> moments the loop is interrupted, see parts op the logfile. >> >> >> >> the weewx.service remains active only sub-processes have been stopped. a >> /etc/init.d./weewx restart reactivate the loop until the next error. >> >> >> >> Question: my idea is a workaround, does anyone know how I can read out >> the last 6 minutes of / var / log / syslog using a cron job (or script) and >> if a text CRITICAL __main occurs that /etc/init.d./weewx restart will be >> executed. >> >> >> >> or is there an easier way for a workaround. >> >> or will it cause other problems in the long term? >> >> >> >> Thnx a lot, in the meantime I'm going to consider a reinstall on another >> Rpi >> >> >> >> (29-12-202) @7:50 >> >> · weewx.engine: Main loop exiting. Shutting engine down. >> >> · weewx.engine: Shutting down StdReport thread >> >> · user.rtldavis: shutdown process /home/pi/work/bin/rtldavis -ex >> 200 -tf EU -tr 1 >> >> · user.rtldavis: rtldavis with pid 1166 killed >> >> · *CRITICAL __main__:* Caught unrecoverable exception: >> >> · CRITICAL __main__: must be real number, not NoneType >> >> >> >> earlier error (27-11-2020) >> >> · CRITICAL __main__: %x format: an integer is >> required, not float >> >> >> >> >> >> >> >> >> >> >> >> LOGFILES -> --- >> >> >> >> Dec 29 02:05:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record >> 2020-12-29 02:05:00 CET (1609203900) to database 'weewx' >> >> Dec 29 02:05:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record >> 2020-12-29 02:05:00 CET (1609203900) to daily summary in 'weewx' >> >> Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record >> 2020-12-29 02:10:00 CET (1609204200) to database 'weewx' >> >> Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record >> 2020-12-29 02:10:00 CET (1609204200) to daily summary in 'weewx' >> >> Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.engine: Garbage >> collected 21556 objects in 0.09 seconds >> >> Dec 29 02:15:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record >> 2020-12-29 02:15:00 CET (1609204500) to database 'weewx' >> >> Dec 29 02:15:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record >> 2020-12-29 02:15:00 CET (1609204500) to daily summary in 'weewx' >> >> --loop still runs well >> -- >> >> Dec 29 07:45:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record >> 2020-12-29 07:45:00 CET (1609224300) to database 'weewx' >> >> Dec 29 07:45:17 wsb-meteo weewx[1162] INFO weewx.manager: Added record >> 2020-12-29 07:45:00 CET (1609224300) to daily summary in 'weewx' >> >> >> >> Error started >> >> >> >> Dec 29 07:50:16 wsb-meteo weewx[1162] INFO weewx.engine: Main loop >> exiting. Shutting engine down. >> >> Dec 29 07:50:16 wsb-meteo weewx[1162] INFO weewx.engine: Shutting down >> StdReport thread >> >> Dec 29 07:50:16 wsb-meteo weewx[1162] INFO user.rtldavis: shutdown >> process /home/pi/work/bin/rtldavis -ex 200 -tf EU -tr 1 >> >> Dec 29 07:50:16 wsb-meteo weewx[1162] INFO user.rtldavis: rtldavis with >> pid 1166 killed >> >> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: Caught >> unrecoverable exception: >> >> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: must >> be real number, not NoneType >> >> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: >> Traceback (most recent call last): >> >> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: File >> "/home/weewx/bin/weewx/engine.py", line
[weewx-user] Re: CRITICAL __main__: **** must be real number, not NoneType OR CRITICAL __main__:*** %x formatpe or : an integer is required, not float
Hi Co, The error on line 938 occurs when no single message is received from the Davis station during an archive interval (typical 5 minutes). The error on line 1200 occurs when data is reveived from an analog temperature sensor. The 12-bit raw data is converted to 10 bits causing the integer type to be changed to a float. (This type of sensor is seldom used with Davis stations.) Luc Op zaterdag 2 januari 2021 om 10:47:10 UTC-3 schreef covan...@gmail.com: > Hi all, > > > > Ik hope someone can help me to automate errorhandling………. > > > > The Rpi with SDR (weewx 4.2 / Mysql / apache) runs well, at inexplicable > moments the loop is interrupted, see parts op the logfile. > > > > the weewx.service remains active only sub-processes have been stopped. a > /etc/init.d./weewx restart reactivate the loop until the next error. > > > > Question: my idea is a workaround, does anyone know how I can read out the > last 6 minutes of / var / log / syslog using a cron job (or script) and if > a text CRITICAL __main occurs that /etc/init.d./weewx restart will be > executed. > > > > or is there an easier way for a workaround. > > or will it cause other problems in the long term? > > > > Thnx a lot, in the meantime I'm going to consider a reinstall on another > Rpi > > > > (29-12-202) @7:50 > > · weewx.engine: Main loop exiting. Shutting engine down. > > · weewx.engine: Shutting down StdReport thread > > · user.rtldavis: shutdown process /home/pi/work/bin/rtldavis -ex > 200 -tf EU -tr 1 > > · user.rtldavis: rtldavis with pid 1166 killed > > · *CRITICAL __main__:* Caught unrecoverable exception: > > · CRITICAL __main__: must be real number, not NoneType > > > > earlier error (27-11-2020) > > · CRITICAL __main__: %x format: an integer is required, > not float > > > > > > > > > > > > LOGFILES -> --- > > > > Dec 29 02:05:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:05:00 CET (1609203900) to database 'weewx' > > Dec 29 02:05:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:05:00 CET (1609203900) to daily summary in 'weewx' > > Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:10:00 CET (1609204200) to database 'weewx' > > Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:10:00 CET (1609204200) to daily summary in 'weewx' > > Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.engine: Garbage collected > 21556 objects in 0.09 seconds > > Dec 29 02:15:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:15:00 CET (1609204500) to database 'weewx' > > Dec 29 02:15:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:15:00 CET (1609204500) to daily summary in 'weewx' > > --loop still runs well > -- > > Dec 29 07:45:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 07:45:00 CET (1609224300) to database 'weewx' > > Dec 29 07:45:17 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 07:45:00 CET (1609224300) to daily summary in 'weewx' > > > > Error started > > > > Dec 29 07:50:16 wsb-meteo weewx[1162] INFO weewx.engine: Main loop > exiting. Shutting engine down. > > Dec 29 07:50:16 wsb-meteo weewx[1162] INFO weewx.engine: Shutting down > StdReport thread > > Dec 29 07:50:16 wsb-meteo weewx[1162] INFO user.rtldavis: shutdown process > /home/pi/work/bin/rtldavis -ex 200 -tf EU -tr 1 > > Dec 29 07:50:16 wsb-meteo weewx[1162] INFO user.rtldavis: rtldavis with > pid 1166 killed > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: Caught > unrecoverable exception: > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: must be > real number, not NoneType > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > Traceback (most recent call last): > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: File > "/home/weewx/bin/weewx/engine.py", line 210, in run > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > self.dispatchEvent(weewx.Event(weewx.CHECK_LOOP, packet=packet)) > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: File > "/home/weewx/bin/weewx/engine.py", line 241, in dispatchEvent > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > callback(event) > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: File > "/home/weewx/bin/weewx/engine.py", line 630, in check_loop > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > raise BreakLoop > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > weewx.engine.BreakLoop > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > > Dec 29
[weewx-user] Re: CRITICAL __main__: **** must be real number, not NoneType OR CRITICAL __main__:*** %x formatpe or : an integer is required, not float
The errors are fixed in version 0.20 these are the changes: line 935 if total_max_count > 0: if total_max_count > 0 and self.stats['pct_good_all'] is not None: line 941 if self.stats['curr_cnt'][i] > 0 and self.stats['count'][i] > 0: if self.stats['curr_cnt'][i] > 0 and self.stats['count'][i] > 0 and self.stats['pct_good'] is not None: line 1199 dbg_parse(2, "thermistor temp_raw=0x%03x temp_c=%s" dbg_parse(2, "thermistor temp_raw=%s temp_c=%s" Op zaterdag 2 januari 2021 om 10:47:10 UTC-3 schreef covan...@gmail.com: > Hi all, > > > > Ik hope someone can help me to automate errorhandling………. > > > > The Rpi with SDR (weewx 4.2 / Mysql / apache) runs well, at inexplicable > moments the loop is interrupted, see parts op the logfile. > > > > the weewx.service remains active only sub-processes have been stopped. a > /etc/init.d./weewx restart reactivate the loop until the next error. > > > > Question: my idea is a workaround, does anyone know how I can read out the > last 6 minutes of / var / log / syslog using a cron job (or script) and if > a text CRITICAL __main occurs that /etc/init.d./weewx restart will be > executed. > > > > or is there an easier way for a workaround. > > or will it cause other problems in the long term? > > > > Thnx a lot, in the meantime I'm going to consider a reinstall on another > Rpi > > > > (29-12-202) @7:50 > > · weewx.engine: Main loop exiting. Shutting engine down. > > · weewx.engine: Shutting down StdReport thread > > · user.rtldavis: shutdown process /home/pi/work/bin/rtldavis -ex > 200 -tf EU -tr 1 > > · user.rtldavis: rtldavis with pid 1166 killed > > · *CRITICAL __main__:* Caught unrecoverable exception: > > · CRITICAL __main__: must be real number, not NoneType > > > > earlier error (27-11-2020) > > · CRITICAL __main__: %x format: an integer is required, > not float > > > > > > > > > > > > LOGFILES -> --- > > > > Dec 29 02:05:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:05:00 CET (1609203900) to database 'weewx' > > Dec 29 02:05:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:05:00 CET (1609203900) to daily summary in 'weewx' > > Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:10:00 CET (1609204200) to database 'weewx' > > Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:10:00 CET (1609204200) to daily summary in 'weewx' > > Dec 29 02:10:16 wsb-meteo weewx[1162] INFO weewx.engine: Garbage collected > 21556 objects in 0.09 seconds > > Dec 29 02:15:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:15:00 CET (1609204500) to database 'weewx' > > Dec 29 02:15:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 02:15:00 CET (1609204500) to daily summary in 'weewx' > > --loop still runs well > -- > > Dec 29 07:45:16 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 07:45:00 CET (1609224300) to database 'weewx' > > Dec 29 07:45:17 wsb-meteo weewx[1162] INFO weewx.manager: Added record > 2020-12-29 07:45:00 CET (1609224300) to daily summary in 'weewx' > > > > Error started > > > > Dec 29 07:50:16 wsb-meteo weewx[1162] INFO weewx.engine: Main loop > exiting. Shutting engine down. > > Dec 29 07:50:16 wsb-meteo weewx[1162] INFO weewx.engine: Shutting down > StdReport thread > > Dec 29 07:50:16 wsb-meteo weewx[1162] INFO user.rtldavis: shutdown process > /home/pi/work/bin/rtldavis -ex 200 -tf EU -tr 1 > > Dec 29 07:50:16 wsb-meteo weewx[1162] INFO user.rtldavis: rtldavis with > pid 1166 killed > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: Caught > unrecoverable exception: > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: must be > real number, not NoneType > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > Traceback (most recent call last): > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: File > "/home/weewx/bin/weewx/engine.py", line 210, in run > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > self.dispatchEvent(weewx.Event(weewx.CHECK_LOOP, packet=packet)) > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: File > "/home/weewx/bin/weewx/engine.py", line 241, in dispatchEvent > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > callback(event) > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: File > "/home/weewx/bin/weewx/engine.py", line 630, in check_loop > > Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__: > raise BreakLoop > > Dec 29 07:50:16