Re: [weewx-development] Re: Python 3 version available for limited testing

2019-04-03 Thread Thomas Keffer
Thanks, Luc Make sure you forward them on to the respective authors. On Wed, Apr 3, 2019 at 6:04 PM wrote: > Tom, > > Improved versions for meteotemplate.py, wcloud.py and weather365.py. > The should run on both Python 2 and Python 3. > > Luc >

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-04-03 Thread ljm . heijst
Tom, Improved versions for meteotemplate.py, wcloud.py and weather365.py. The should run on both Python 2 and Python 3. Luc #!/usr/bin/env python # Copyright 2016-2017 Matthew Wall # Licensed under the terms of the GPLv3 """ Meteotemplate is a weather website system written in PHP by Jachym.

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-30 Thread ljm . heijst
> > On Saturday, 30 March 2019 16:27:32 UTC-3, Hartmut Schweidler wrote: >> >> I do not remember where I read (ich weiß ich mehr wo ich gelesen habe) >> > I found it here: https://groups.google.com/forum/#!msg/weewx-user/h_gvi_b0Inc/Sxfz-waQCAAJ Hartmut, please open a new thread if you have

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-30 Thread ljm . heijst
On Saturday, 30 March 2019 16:27:32 UTC-3, Hartmut Schweidler wrote: > > Hallo > > in kl.py Klimalog-driver > > temp x < 81.0 if temp x = 81.0 temp not defined > also > humidity x < 100.0 if humidity > 100 not defined > > # calculate dewpoints and heatindices > # FIXME: this

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-30 Thread Hartmut Schweidler
Hallo in kl.py Klimalog-driver temp x < 81.0 if temp x = 81.0 temp not defined also humidity x < 100.0 if humidity > 100 not defined # calculate dewpoints and heatindices # FIXME: this belongs in StdWXCalculate for y in range(0, 9): if data.values['Temp%d'

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-30 Thread ljm . heijst
Thanks, will change it.

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-30 Thread Hartmut Schweidler
Hallo Luc Hallo Tom the driver meteostick.py # message received via repeater # Calculate crc with bytes 0-5 and 8-9, result must be equal # to bytes 6-7 chksum = (pkt[6] << 8) + pkt[7] for i in xrange(0, 6):must

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-30 Thread Hartmut Schweidler
Am Samstag, 30. März 2019 08:52:44 UTC+1 schrieb Hartmut Schweidler: > > Hallo Luc > Hallo Tom > > Good Morning > the driver meteostick.py > > is IO > > I need a hint > if a value = Null or None > > an Error > Mar 30 08:45:21 wx2013 weewx[6461]: cheetahgenerator: Reason: > unorderable

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-30 Thread Hartmut Schweidler
Hallo Luc Hallo Tom Good Morning the driver meteotemplate.py is IO I need a hint if a value = Null or None an Error Mar 30 08:45:21 wx2013 weewx[6461]: cheetahgenerator: Reason: unorderable types: NoneType() < int() Mar 30 08:45:21 wx2013 weewx[6461]: Traceback (most recent call

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-26 Thread ljm . heijst
On Tuesday, 26 March 2019 14:52:48 UTC-3, Hartmut Schweidler wrote: > > I'm looking for the drivers "Meteostick driver for weewx" and/ or "klimalogg > driver for weewx" as python3 version > Hallo Hartmut, I will convert and test those two drivers the coming days. Luc

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-26 Thread Hartmut Schweidler
Hallo I'm looking for the drivers "Meteostick driver for weewx" and/ or "klimalogg driver for weewx" as python3 version Hartmut

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread ljm . heijst
On Monday, 25 March 2019 17:59:57 UTC-3, vince...@gmail.com wrote: > > You might want to do an altinstall of a later version. Email me if you > want a script I found that does this nicely on the pi and I'll send it > tonight... > Vince, Thanks. Currently all problems are solved and I have

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread Thomas Keffer
If you used import six from six.moves import queue then you want except queue.Empty If you are not using six, then you can do something like: try: import Queue as queue except ImportError: import queue and the except clause becomes: except queue.Empty -tk On Mon, Mar 25, 2019

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread Thomas Keffer
I can't speak to the logic of the code, but it looks like it should work under Python 2 and 3. A couple things to think about: 1. You cannot count on the user having the shim 'six', although it is becoming increasingly common. Many python installations include it by default. In any case,

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread ljm . heijst
On Monday, 25 March 2019 15:57:14 UTC-3, vince...@gmail.com wrote: > > Just in case, what os are you on, which version, and what version of > python3 are you running ? > Vince, root@pi36:~# uname -a Linux pi36 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux root@pi36:~#

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread ljm . heijst
On Monday, 25 March 2019 15:36:08 UTC-3, Tom Keffer wrote: > > What's the problem with getting it working? > This statemennt: except Queue.Empty: All variations I tried gave different errors. except Queue.Empty: except Queue.empty: except queue.Empty: except queue.empty: Futhermore: when I

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread ljm . heijst
On Monday, 25 March 2019 12:53:01 UTC-3, ljm.h...@gmail.com wrote: > > I will try this construction once again. > Tom, I give up; can't get it working. I'll wait for Matthew to convert his weewx-sdr driver; I've 'borrowed' the code from there. Luc

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread ljm . heijst
On Monday, 25 March 2019 12:25:29 UTC-3, Tom Keffer wrote: > > from queue import Queue > works for me under Python 3. > Tom, I will try this construction once again. How should I solve the Python 2: xrange, Python 3: range differences? Luc

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread ljm . heijst
Soory, I made a mistake. > The first snippet should be: > snippet from cmon.py: > === > def new_archive_record(self, event): > """save data to database then prune old records as needed""" > now = int(time.time() + 0.5) > delta = now -

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread ljm . heijst
Hi Tom, I do not know if this issue is known already. I got a deadlock in cmon.py, see code and traceback below: snippet from cmon.py: === def new_archive_record(self, event): """save data to database then prune old records as needed""" now =

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread Thomas Keffer
Luc, You are very close to having a code base that will run under both Python 2 and 3. Suggestions: 1. Put this at the top to cover your use of multiple arguments to "print": from __future__ import print_function 2. For a queue, do this: try: # Python 2 from Queue import Queue except

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Thomas Keffer
Yes, this is a limitation in the way database bindings are presently implemented. It is very hard for a search list extension (in this case, $alltime) to use a custom binding. Thank you for reminding me. Version 4 would be a good time to introduce these kinds of changes, as they may break

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Thomas Keffer
Thanks again! Fixed in commit 6c24156 Do a pull, and try again. On Sat, Mar 2, 2019 at 11:18 AM Hartmut Schweidler wrote: > I uploaded the "public_html" via fileZilla for testing > > the site on

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Hartmut Schweidler
I uploaded the "public_html" via fileZilla for testing the site on http://wh3080.hes61.de/index.html it is not complete yet but it looks good

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Hartmut Schweidler
Thank you for your prompt reply. i forgot in weewx.conf [[FTP]] > # FTP'ing the results to a webserver is treated as just another > report, > # albeit one with an unusual report generator! > skin = Ftp > > # If you wish to use FTP, set "enable" to "true", then

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Thomas Keffer
Thanks, Hartmut! I think the problem is that the file that is to be FTP'd, was being opened in text mode instead of binary. So, it was trying to decode it into Unicode. Fixed in commit 5167069 Do a pull on the

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Hartmut Schweidler
Hallo my try python3 and weewx Mar 2 15:20:47 wx2013 weewx[30145]: copygenerator: copied 0 files to /home/weewx/public_html/mobile Mar 2 15:20:48 wx2013 weewx[30145]: reportengine: Caught unrecoverable exception in generator 'weewx.reportengine.FtpGenerator' Mar 2 15:20:48 wx2013