Hallo Gary,

I will test it after 15:00 clock Berlin time
thank you in advance

Hartmut
Am Freitag, 17. März 2017 00:57:09 UTC+1 schrieb gjr80:
>
> Hallo Hartmut,
>
> Apologies for the time I took in getting back to you. I think we have 
> finally tracked down the issue. When I was running a similar setup to yours 
> on a VM using SQLite everything worked as expected, extraTemp1 and 
> extraTemp2 were set correctly. I then migrated over to MySQL and then 
> observed the behaviour you have been experiencing. The issue as it turns 
> out is due to python package MySQLdb turning off autocommit by default. 
> This means we need to manually commit after making changes to the db. I had 
> incorrectly assumed this was occurring when we exited the with statement. 
> Try adding the highlighted line to def clear-v2-data() (about line 589):
>
>                         dbmanager_wx.updateValue(_rec['dateTime'], 
> 'extraTemp1', None)
>                         dbmanager_wx.updateValue(_rec['dateTime'], 
> 'extraTemp2', None)
>                         nrecs += 1
>                     dbmanager_wx.connection.commit()
>                     # all done, say so and give some stats
>                     print "Done. 'extraTemp1' and 'extraTemp2' cleared in 
> %d records (approx %d days)." %(nrecs, ndays)
>
> Let us know how you go. Oh, and if it works you can thank Tom, it was 
> beyond me so I emailed for some help!
>
> Gary
>
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> <http://amd350/phpmyadmin/sql.php?db=weewxAlt&table=archive&sql_query=DELETE+FROM+%60weewxAlt%60.%60archive%60+WHERE+%60archive%60.%60dateTime%60+%3D+1489592400&message_to_show=Der+Datensatz+wurde+gel%C3%B6scht.&goto=sql.php%3Fdb%3DweewxAlt%26table%3Darchive%26sql_query%3DSELECT%2B%2560dateTime%2560%252C%2B%2560extraTem>
>>
>

Reply via email to