[weewx-user] Re: Weewx "off line"

2020-02-13 Thread Invisible Man
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.





On Monday, December 2, 2019 at 2:04:42 AM UTC+1, Teva MERVIN wrote:
>
> *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 

[weewx-user] Re: Weewx "off line"

2019-12-01 Thread Teva MERVIN
*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 :
>
> 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 = 
> 

[weewx-user] Re: Weewx "off line"

2019-11-29 Thread Chris Manton
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,


On Wednesday, November 20, 2019 at 7:01:44 PM UTC-8, Teva MERVIN wrote:
>
> OK tk.
>
> 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: Non-positive 
>> value for record field 'interval': 0 
>> nov. 19 13:34:26 Nas weewx[2110]:   Exiting.
>>
>> Thank you.
>>
>

-- 
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/a43888d1-975a-48d3-9543-8d42053df1e0%40googlegroups.com.


[weewx-user] Re: Weewx "off line"

2019-11-20 Thread Teva MERVIN
OK tk.

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: Non-positive 
> value for record field 'interval': 0 
> nov. 19 13:34:26 Nas weewx[2110]:   Exiting.
>
> Thank you.
>

-- 
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/7f003d3c-c0a4-4f0f-b3d6-ff4cefd3295b%40googlegroups.com.


Re: [weewx-user] Re: Weewx "off line"

2019-11-20 Thread Thomas Keffer
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

On Wed, Nov 20, 2019 at 1:14 PM Teva MERVIN  wrote:

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

>>> --
> 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/83b29f0a-10b1-40c9-b779-69a6a1e040af%40googlegroups.com
> 
> .
>

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

Re: [weewx-user] Re: Weewx "off line"

2019-11-20 Thread Teva MERVIN
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 
>>> 
>>>  
>>> .
>>>
>>

-- 
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/83b29f0a-10b1-40c9-b779-69a6a1e040af%40googlegroups.com.


Re: [weewx-user] Re: Weewx "off line"

2019-11-20 Thread Thomas Keffer
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

On Wed, Nov 20, 2019 at 5:35 AM Thomas Keffer  wrote:

> I've re-opened issue #375. Hopefully, Chris will have some time to
> investigate.
>
> -tk
>
> On Wed, Nov 20, 2019 at 1:08 AM Teva MERVIN  wrote:
>
>> yes I used it.
>>
>> https://github.com/weewx/weewx/issues/375
>>
>> Le mercredi 20 novembre 2019 14:19:37 UTC+11, Andrew Milner a écrit :
>>>
>>> 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??
>>>
>>>
>>>
>>> On Wednesday, 20 November 2019 04:00:18 UTC+2, Teva MERVIN wrote:

 Some details of my installation:

 - Debian server 5.2.17-1
 - Weewx 3.9.2-0
 - Database: sqlite
 - Skin: Weather34
 - 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: Non-positive
> value for record field 'interval': 0
> nov. 19 13:34:26 Nas weewx[2110]:   Exiting.
>
> Thank you.
>
 --
>> 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/79c90acf-06a3-4bf2-80d3-06023c177025%40googlegroups.com
>> 
>> .
>>
>

-- 
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/CAPq0zECgzWq1L8o39NyJ6H1zhpzYpDLE7_-aB1tyzgE-uwF7Dg%40mail.gmail.com.
#
#Copyright (c) 2009-2017 Tom Keffer 
#
#See the file LICENSE.txt for your full rights.
#
"""Classes and functions for interfacing with a weewx archive."""

from __future__ import print_function
import math
import syslog
import sys
import datetime
import time

import weewx.accum
from weewx.units import ValueTuple
import weewx.units
import weeutil.weeutil
import weedb
from weeutil.weeutil import timestamp_to_string, isStartOfDay, to_int


class IntervalError(ValueError):
"""Raised when a bad value of 'interval' is encountered."""


#==
# class Manager
#==

class Manager(object):
"""Manages a database table. Offers a number of convenient member
functions for querying and inserting data into the table. 
These functions encapsulate whatever sql statements are needed.

A limitation of this implementation is that it caches the timestamps of the 
first and last record in the table. Normally, the caches get updated as data comes
in. However, if one manager is updating the table, wile another is doing
aggregate queries, 

Re: [weewx-user] Re: Weewx "off line"

2019-11-20 Thread Thomas Keffer
I've re-opened issue #375. Hopefully, Chris will have some time to
investigate.

-tk

On Wed, Nov 20, 2019 at 1:08 AM Teva MERVIN  wrote:

> yes I used it.
>
> https://github.com/weewx/weewx/issues/375
>
> Le mercredi 20 novembre 2019 14:19:37 UTC+11, Andrew Milner a écrit :
>>
>> 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??
>>
>>
>>
>> On Wednesday, 20 November 2019 04:00:18 UTC+2, Teva MERVIN wrote:
>>>
>>> Some details of my installation:
>>>
>>> - Debian server 5.2.17-1
>>> - Weewx 3.9.2-0
>>> - Database: sqlite
>>> - Skin: Weather34
>>> - 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: Non-positive
 value for record field 'interval': 0
 nov. 19 13:34:26 Nas weewx[2110]:   Exiting.

 Thank you.

>>> --
> 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/79c90acf-06a3-4bf2-80d3-06023c177025%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zEAPtWDK9cJsHikvKX9w1EFoagGQU_1w1g-AxVJo%2BwEZZw%40mail.gmail.com.


[weewx-user] Re: Weewx "off line"

2019-11-20 Thread Teva MERVIN
yes I used it.

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

Le mercredi 20 novembre 2019 14:19:37 UTC+11, Andrew Milner a écrit :
>
> 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??
>
>
>
> On Wednesday, 20 November 2019 04:00:18 UTC+2, Teva MERVIN wrote:
>>
>> Some details of my installation:
>>
>> - Debian server 5.2.17-1
>> - Weewx 3.9.2-0
>> - Database: sqlite
>> - Skin: Weather34
>> - 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: Non-positive 
>>> value for record field 'interval': 0 
>>> nov. 19 13:34:26 Nas weewx[2110]:   Exiting.
>>>
>>> Thank you.
>>>
>>

-- 
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/79c90acf-06a3-4bf2-80d3-06023c177025%40googlegroups.com.


[weewx-user] Re: Weewx "off line"

2019-11-19 Thread Andrew Milner
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??



On Wednesday, 20 November 2019 04:00:18 UTC+2, Teva MERVIN wrote:
>
> Some details of my installation:
>
> - Debian server 5.2.17-1
> - Weewx 3.9.2-0
> - Database: sqlite
> - Skin: Weather34
> - 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: Non-positive 
>> value for record field 'interval': 0 
>> nov. 19 13:34:26 Nas weewx[2110]:   Exiting.
>>
>> Thank you.
>>
>

-- 
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/03d04bfa-faf4-4878-82e0-4b24d21f138a%40googlegroups.com.


[weewx-user] Re: Weewx "off line"

2019-11-19 Thread Teva MERVIN
Some details of my installation:

- Debian server 5.2.17-1
- Weewx 3.9.2-0
- Database: sqlite
- Skin: Weather34
- 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: Non-positive 
> value for record field 'interval': 0 
> nov. 19 13:34:26 Nas weewx[2110]:   Exiting.
>
> Thank you.
>

-- 
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/0c93a1ce-4fd0-4741-8068-8fb8f42af1bc%40googlegroups.com.


[weewx-user] Re: Weewx "off line"

2019-11-19 Thread Andrew Milner
are you running 3.9.2??

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



On Tuesday, 19 November 2019 07:36:37 UTC+2, Teva MERVIN wrote:
>
> 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.
>

-- 
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/937cbea7-28c8-4bb6-95c7-9a6cc43779cd%40googlegroups.com.