Thanks for your quick response Tom, I posted it on lheist's Git. I hope he
can fix it?
The crazy thing is the spontaneous occurrence, every 5 minutes the loop
runs, some days without error and then suddenly this happend ....

As a workaround for the time to fix .....
- appear there other errors if i restart the weewx.server each hour
preventive? technicly possible with Cron.
- do you have an idea to automate when this occours (if message is CRITICAL
than ......) at script / tool? (read last 6 min. from syslog for CRITICAL
sign)

thanks! And keep up the good work! compliments for your work!

Op za 2 jan. 2021 om 15:30 schreef Tom Keffer <tkef...@gmail.com>:

> These are both simple errors in the driver rtldavis. Ask the driver's
> author to fix the problem.
>
> On Sat, Jan 2, 2021 at 5:47 AM Co van der lee <covander...@gmail.com>
> wrote:
>
>> 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 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****  During
>> handling of the above exception, another exception occurred:
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>>
>> 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 646, in post_loop
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> self._catchup(self.engine.console.genArchiveRecords)
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/weewx/engine.py", line 690, in _catchup
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> for record in generator(lastgood_ts):
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/weewx/drivers/__init__.py", line 30, in genArchiveRecords
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> raise NotImplementedError("Method 'genArchiveRecords' not implemented")
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> NotImplementedError: Method 'genArchiveRecords' not implemented
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****  During
>> handling of the above exception, another exception occurred:
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>>
>> 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
>> "./bin/weewxd", line 154, in main
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/weewx/engine.py", line 217, in run
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
>>
>> 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 648, in post_loop
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> self._software_catchup()
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/weewx/engine.py", line 710, in _software_catchup
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> origin='software'))
>>
>> 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/user/rtldavis.py", line 949, in new_archive_record
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> self._update_summaries()  # calculate summaries
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/user/rtldavis.py", line 938, in _update_summaries
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> (total_max_count, total_count, total_missed, self.stats['pct_good_all']))
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> TypeError: must be real number, not NoneType
>>
>> Dec 29 07:50:16 wsb-meteo weewx[1162] CRITICAL __main__:     ****
>> Exiting.
>>
>>
>>
>>
>>
>> Earlier error:
>>
>>
>>
>> Nov 27 00:35:22 wsb-meteo weewx[2352] INFO weewx.reportengine: Copied 0
>> files to /home/weewx/public_html
>>
>> Nov 27 00:40:17 wsb-meteo weewx[2352] INFO weewx.manager: Added record
>> 2020-11-27 00:40:00 CET (1606434000) to database 'weewx'
>>
>> Nov 27 00:40:17 wsb-meteo weewx[2352] INFO weewx.manager: Added record
>> 2020-11-27 00:40:00 CET (1606434000) to daily summary in 'weewx'
>>
>> Nov 27 00:40:17 wsb-meteo weewx[2352] INFO weewx.restx: WindGuru:
>> Published record 2020-11-27 00:40:00 CET (1606434000)
>>
>> Nov 27 00:40:17 wsb-meteo weewx[2352] INFO weewx.restx: Windy: Published
>> record 2020-11-27 00:40:00 CET (1606434000)
>>
>> Nov 27 00:40:20 wsb-meteo weewx[2352] INFO weewx.cheetahgenerator:
>> Generated 8 files for report SeasonsReport in 2.97 seconds
>>
>> Nov 27 00:40:21 wsb-meteo weewx[2352] INFO weewx.imagegenerator:
>> Generated 15 images for report SeasonsReport in 1.52 seconds
>>
>> Nov 27 00:40:21 wsb-meteo weewx[2352] INFO weewx.reportengine: Copied 0
>> files to /home/weewx/public_html
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] INFO weewx.engine: Main loop
>> exiting. Shutting engine down.
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] INFO weewx.engine: Shutting down
>> StdReport thread
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] INFO user.rtldavis: shutdown
>> process /home/pi/work/bin/rtldavis -ex 200 -tf EU -tr 1
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] INFO user.rtldavis: rtldavis with
>> pid 2358 killed
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__: Caught
>> unrecoverable exception:
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****  %x
>> format: an integer is required, not float
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****
>> Traceback (most recent call last):
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****    File
>> "./bin/weewxd", line 154, in main
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/weewx/engine.py", line 203, in run
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****
>> for packet in self.console.genLoopPackets():
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/user/rtldavis.py", line 995, in genLoopPackets
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****
>>      for data in PacketFactory.create(self, lines):
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/user/rtldavis.py", line 616, in create
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****
>> pkt = PacketFactory.parse_text(self, lines)
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/user/rtldavis.py", line 628, in parse_text
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****
>> pkt = parser.parse_text(self, payload, lines)
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/user/rtldavis.py", line 529, in parse_text
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****
>> pkt = self.parse_raw(self, raw_pkt)
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****    File
>> "/home/weewx/bin/user/rtldavis.py", line 1200, in parse_raw
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****      %
>> (temp_raw, temp_c))
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****
>> TypeError: %x format: an integer is required, not float
>>
>> Nov 27 00:44:02 wsb-meteo weewx[2352] CRITICAL __main__:     ****
>> Exiting.
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/CABQzV8ztcp37LWirGbRXcv9R5E6L2juQ%2BRb83_1%2B-%2BATviDxbg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/weewx-user/CABQzV8ztcp37LWirGbRXcv9R5E6L2juQ%2BRb83_1%2B-%2BATviDxbg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/CAPq0zED1mB1xtzT%3Dt3bagtJOhYgUhNtZwKybJdp1NxRCN%2BBeQQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/weewx-user/CAPq0zED1mB1xtzT%3Dt3bagtJOhYgUhNtZwKybJdp1NxRCN%2BBeQQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CABQzV8xn%3D31X7SZZZ91k4z4W%2B7A_q29adeSVBoup5jXOS6AhuQ%40mail.gmail.com.

Reply via email to