Weewx "off line"

248 views
Skip to first unread message

Teva MERVIN

unread,
Nov 19, 2019, 12:36:37 AM11/19/19
to weewx-user
Hello.
I have a problem that I can not identify.
It happens at least once a day, and I have to restart weewx.
Do you have ideas?

root@Nas:~# service weewx status    
weewx.service - LSB: weewx weather system
  Loaded: loaded (/etc/init.d/weewx; generated)
  Active: active (exited) since Sun 2019-11-17 19:09:21 +11; 1 day 21h ago
    Docs: man:systemd-sysv-generator(8)
 Process: 2094 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)

nov. 19 13:34:26 Nas weewx[2110]:     ****    File "/usr/share/weewx/weewx/engine.py", line 601, in new_archive_record
nov. 19 13:34:26 Nas weewx[2110]:     ****      dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
nov. 19 13:34:26 Nas weewx[2110]:     ****    File "/usr/share/weewx/weewx/manager.py", line 246, in addRecord
nov. 19 13:34:26 Nas weewx[2110]:     ****      self._addSingleRecord(record, cursor, log_level)
nov. 19 13:34:26 Nas weewx[2110]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1212, in _addSingleRecord
nov. 19 13:34:26 Nas weewx[2110]:     ****      _weight = self._calc_weight(record)
nov. 19 13:34:26 Nas weewx[2110]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1582, in _calc_weight
nov. 19 13:34:26 Nas weewx[2110]:     ****      raise ValueError("Non-positive value for record field 'interval': %s" % (record['interval'], ))
nov. 19 13:34:26 Nas weewx[2110]:     ****  ValueError: Non-positive value for record field 'interval': 0
nov. 19 13:34:26 Nas weewx[2110]:     ****  Exiting.

Thank you.

Andrew Milner

unread,
Nov 19, 2019, 6:40:05 AM11/19/19
to weewx-user
are you running 3.9.2??

search the forum for non-positive value for record field 'interval' and you will find many other threads

Teva MERVIN

unread,
Nov 19, 2019, 9:00:18 PM11/19/19
to weewx-user
Some details of my installation:

- Debian server 5.2.17-1
- Weewx 3.9.2-0
- Database: sqlite
- Skin: Weather34
- Station: Oregon WMR200

Andrew Milner

unread,
Nov 19, 2019, 10:19:37 PM11/19/19
to weewx-user
it was my understanding from one of the threads that there was a version of the driver supposed to address this issue - have you used that version of the wmr driver??

Teva MERVIN

unread,
Nov 20, 2019, 4:08:42 AM11/20/19
to weewx-user

Thomas Keffer

unread,
Nov 20, 2019, 8:36:04 AM11/20/19
to weewx-user
I've re-opened issue #375. Hopefully, Chris will have some time to investigate.

-tk

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/79c90acf-06a3-4bf2-80d3-06023c177025%40googlegroups.com.

Thomas Keffer

unread,
Nov 20, 2019, 8:52:15 AM11/20/19
to weewx-user
In the meantime, here is a version of manager.py that will simply ignore records with bad values of 'interval', rather than stopping. It's not a cure, but at least the results will be more robust. Give it a try.

-tk
manager.py

Teva MERVIN

unread,
Nov 20, 2019, 4:14:04 PM11/20/19
to weewx-user
Thank you for your help.
What do I do with this manager.py file?

Le jeudi 21 novembre 2019 00:52:15 UTC+11, Thomas Keffer a écrit :
En attendant, voici une version de manager.py qui ignorera simplement les enregistrements contenant de mauvaises valeurs 'intervalle' au lieu de s'arrêter. Ce n'est pas un remède, mais au moins les résultats seront plus robustes. Essaie.

-tk

Le mercredi 20 novembre 2019 à 05h35, Thomas Keffer < tke ... @ gmail.com > a écrit:
J'ai ré-ouvert le numéro 375. J'espère que Chris aura du temps pour enquêter.

-tk

Le mercredi 20 novembre 2019 à 01h08 Teva MERVIN < mte ... @ gmail.com > a écrit:
oui je l'ai utilisé.

https://github.com/weewx/weewx/issues/375

Le mercredi 20 novembre 2019 14:19:37 UTC+11, Andrew Milner a écrit :
d'après l'une des discussions, il y avait une version du pilote censée résoudre ce problème - avez-vous utilisé cette version du pilote wmr?



Le mercredi 20 novembre 2019, Teva MERVIN a écrit:
Quelques détails de mon installation:

- Debian server 5.2.17-1
- Weewx 3.9.2-0
- Base de données: sqlite
- Peau: Météo34
- Station: Oregon WMR200

Le mardi 19 novembre 2019 16:36:37 UTC+11, Teva MERVIN a écrit :
Hello.
I have a problem that I can not identify.
It happens at least once a day, and I have to restart weewx.
Do you have ideas?

root@Nas:~# service weewx status    
weewx.service - LSB: weewx weather system
  Loaded: loaded (/etc/init.d/weewx; generated)
  Active: active (exited) since Sun 2019-11-17 19:09:21 +11; 1 day 21h ago
    Docs: man:systemd-sysv-generator(8)
 Process: 2094 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)

nov. 19 13:34:26 Nas weewx[2110]:     ****    File "/usr/share/weewx/weewx/engine.py", line 601, in new_archive_record
nov. 19 13:34:26 Nas weewx[2110]:     ****      dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
nov. 19 13:34:26 Nas weewx[2110]:     ****    File "/usr/share/weewx/weewx/manager.py", line 246, in addRecord
nov. 19 13:34:26 Nas weewx[2110]:     ****      self._addSingleRecord(record, cursor, log_level)
nov. 19 13:34:26 Nas weewx[2110]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1212, in _addSingleRecord
nov. 19 13:34:26 Nas weewx[2110]:     ****      _weight = self._calc_weight(record)
nov. 19 13:34:26 Nas weewx[2110]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1582, in _calc_weight
nov. 19 13:34:26 Nas weewx[2110]:     ****      raise ValueError("Non-positive value for record field 'interval': %s" % (record['interval'], ))
nov. 19 13:34:26 Nas weewx [2110]:     **** ValueError: valeur non positive pour le champ d'enregistrement 'intervalle': 0 nov. 19 13:34:26 Nas weewx [2110]:     **** Sortie.


Merci.

-
Vous avez reçu ce message car vous êtes abonné au groupe "weewx-user" de Google Groupes.
Pour vous désabonner de ce groupe et ne plus recevoir de courrier électronique, envoyez un courrier électronique à weewx ... @ googlegroups.com .
Pour afficher cette discussion sur Internet, consultez la page https://groups.google.com/d/ msgid / weewx-user / 79c90acf- 06a3-4bf2-80d3-06023c177025% 40googlegroups.com .

Thomas Keffer

unread,
Nov 20, 2019, 4:21:51 PM11/20/19
to weewx-user
Replace /usr/share/weewx/weewx/manager.py with it. For example, if the new copy is in your home directory:

cd ~
sudo mv /usr/share/weewx/weewx/manager.py /usr/share/weewx/weewx/manager.py.backup
sudo cp manager.py /usr/share/weewx/weewx/manager.py


-tk

--
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+...@googlegroups.com.

Teva MERVIN

unread,
Nov 20, 2019, 10:01:44 PM11/20/19
to weewx-user
OK tk.


Le mardi 19 novembre 2019 16:36:37 UTC+11, Teva MERVIN a écrit :

Chris Manton

unread,
Nov 29, 2019, 12:08:18 PM11/29/19
to weewx-user
Hi,

Do you have a longer stack trace of the log prior to failure and could you provide your configuration file for this set up ?

thx,

Teva MERVIN

unread,
Dec 1, 2019, 8:04:42 PM12/1/19
to weewx-user
syslog :

Dec  2 10:11:50 Nas weewx[1784]: wmr200: MainThread: I Using pc time adjusting archive record time by -251 sec 2019-12-02 10:15:00 +11 (1575242100) => 2019-12-02 10:10:49 +11 (1575241849)
Dec  2 10:11:50 Nas weewx[1784]: manager: Added record 2019-12-02 10:10:49 +11 (1575241849) to database 'weewx.sdb'
Dec  2 10:11:50 Nas weewx[1784]: engine: Main loop exiting. Shutting engine down.
Dec  2 10:11:50 Nas weewx[1784]: wmr200: Thread-8: I USB polling device thread exiting
Dec  2 10:11:50 Nas weewx[1784]: wmr200: MainThread: I USB polling thread expired
Dec  2 10:11:50 Nas weewx[1784]: wmr200: Thread-7: I Watchdog received shutdown
Dec  2 10:11:50 Nas weewx[1784]: wmr200: Thread-7: I Watchdog thread exiting
Dec  2 10:11:50 Nas weewx[1784]: wmr200: MainThread: I Watchdog thread expired
Dec  2 10:11:50 Nas weewx[1784]: wmr200: MainThread: I Received packet count live:2951 archive:20 control:188
Dec  2 10:11:50 Nas weewx[1784]: wmr200: MainThread: I Received bytes:592 sent bytes:40
Dec  2 10:11:50 Nas weewx[1784]: wmr200: MainThread: I Packet archive queue len:0 live queue len:8
Dec  2 10:11:50 Nas weewx[1784]: wmr200: MainThread: W Exiting with packets still in live queue cnt:8
Dec  2 10:11:50 Nas weewx[1784]: wmr200: MainThread: I Driver gracefully exiting
Dec  2 10:11:50 Nas weewx[1784]: engine: Caught unrecoverable exception in engine:
Dec  2 10:11:50 Nas weewx[1784]:     ****  Non-positive value for record field 'interval': 0
Dec  2 10:11:50 Nas weewx[1784]:     ****  Traceback (most recent call last):
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/engine.py", line 894, in main
Dec  2 10:11:50 Nas weewx[1784]:     ****      engine.run()
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/engine.py", line 160, in run
Dec  2 10:11:50 Nas weewx[1784]:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
Dec  2 10:11:50 Nas weewx[1784]:     ****      callback(event)
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/engine.py", line 520, in startup
Dec  2 10:11:50 Nas weewx[1784]:     ****      self._catchup(self.engine.console.genStartupRecords)
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/engine.py", line 635, in _catchup
Dec  2 10:11:50 Nas weewx[1784]:     ****      origin='hardware'))
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
Dec  2 10:11:50 Nas weewx[1784]:     ****      callback(event)
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/engine.py", line 601, in new_archive_record
Dec  2 10:11:50 Nas weewx[1784]:     ****      dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/manager.py", line 246, in addRecord
Dec  2 10:11:50 Nas weewx[1784]:     ****      self._addSingleRecord(record, cursor, log_level)
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1212, in _addSingleRecord
Dec  2 10:11:50 Nas weewx[1784]:     ****      _weight = self._calc_weight(record)
Dec  2 10:11:50 Nas weewx[1784]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1582, in _calc_weight
Dec  2 10:11:50 Nas weewx[1784]:     ****      raise ValueError("Non-positive value for record field 'interval': %s" % (record['interval'], ))
Dec  2 10:11:50 Nas weewx[1784]:     ****  ValueError: Non-positive value for record field 'interval': 0
Dec  2 10:11:50 Nas weewx[1784]:     ****  Exiting.





Le mardi 19 novembre 2019 16:36:37 UTC+11, Teva MERVIN a écrit :
weewx.conf

Invisible Man

unread,
Feb 13, 2020, 5:14:16 AM2/13/20
to weewx-user
FYI, I have the same issue.
I am using:

  • Weewx 3.9.2-1
  • WMR200
  • Raspberry Pi 3 Model B
  • Raspbian 10 buster
I will try and use the patched manager.py

Feb 12 21:33:40 vegan weewx[429]: engine: Main loop exiting. Shutting engine down.
Feb 12 21:33:40 vegan weewx[429]: restx: Shut down Twitter thread.
Feb 12 21:33:40 vegan weewx[429]: wmr200: Thread-2: I USB polling device thread exiting
Feb 12 21:33:40 vegan weewx[429]: wmr200: MainThread: I USB polling thread expired
Feb 12 21:33:40 vegan weewx[429]: wmr200: Thread-1: I Watchdog received shutdown
Feb 12 21:33:40 vegan weewx[429]: wmr200: Thread-1: I Watchdog thread exiting
Feb 12 21:33:40 vegan weewx[429]: wmr200: MainThread: I Watchdog thread expired
Feb 12 21:33:40 vegan weewx[429]: wmr200: MainThread: I Received packet count live:15 archive:1 control:1
Feb 12 21:33:40 vegan weewx[429]: wmr200: MainThread: I Received bytes:2640 sent bytes:56
Feb 12 21:33:40 vegan weewx[429]: wmr200: MainThread: I Packet archive queue len:0 live queue len:15
Feb 12 21:33:40 vegan weewx[429]: wmr200: MainThread: W Exiting with packets still in live queue cnt:15
Feb 12 21:33:40 vegan weewx[429]: wmr200: MainThread: I Driver gracefully exiting
Feb 12 21:33:40 vegan weewx[429]: engine: Caught unrecoverable exception in engine:
Feb 12 21:33:40 vegan weewx[429]:     ****  Non-positive value for record field 'interval': 0
Feb 12 21:33:40 vegan weewx[429]:     ****  Traceback (most recent call last):
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/engine.py", line 894, in main
Feb 12 21:33:40 vegan weewx[429]:     ****      engine.run()
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/engine.py", line 160, in run
Feb 12 21:33:40 vegan weewx[429]:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
Feb 12 21:33:40 vegan weewx[429]:     ****      callback(event)
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/engine.py", line 520, in startup
Feb 12 21:33:40 vegan weewx[429]:     ****      self._catchup(self.engine.console.genStartupRecords)
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/engine.py", line 635, in _catchup
Feb 12 21:33:40 vegan weewx[429]:     ****      origin='hardware'))
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
Feb 12 21:33:40 vegan weewx[429]:     ****      callback(event)
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/engine.py", line 601, in new_archive_record
Feb 12 21:33:40 vegan weewx[429]:     ****      dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/manager.py", line 246, in addRecord
Feb 12 21:33:40 vegan weewx[429]:     ****      self._addSingleRecord(record, cursor, log_level)
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1212, in _addSingleRecord
Feb 12 21:33:40 vegan weewx[429]:     ****      _weight = self._calc_weight(record)
Feb 12 21:33:40 vegan weewx[429]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1582, in _calc_weight
Feb 12 21:33:40 vegan weewx[429]:     ****      raise ValueError("Non-positive value for record field 'interval': %s" % (rec
Feb 12 21:33:40 vegan weewx[429]:     ****  ValueError: Non-positive value for record field 'interval': 0
Feb 12 21:33:40 vegan weewx[429]:     ****  Exiting.


Reply all
Reply to author
Forward
0 new messages