I have weewx-forecast working with WeeWx 4 and Python2 and 3.  It does 
correctly download forecasts.

https://github.com/chaunceygardiner/weewx-forecast 

There were a couple of Python3 gotchas, but the big one is this:

    def __init__(self, target, *args):
        self._target = target
        self._args = args
        threading.Thread.__init__(self)
The threading.Thread.__init__(self) line is wiping out the two assignments 
above it.
Move that __init__  up to the first line.


> On Feb 17, 2020, at 8:18 AM, Vince Skahan <[email protected]> wrote:
> 
> 
>> On Monday, February 17, 2020 at 7:23:26 AM UTC-8, Joel Bion wrote:
>> Most of my time was spent scanning through the weewx-purpleair extension. 
>> Since it had been written to support only Python2, I didn't want to make 
>> just the syntactic changes, but convince myself that the rest of the script 
>> would actually do what was intended.
> 
> I run that one too.  Works fine in both python versions after running it 
> through "2to3 -w" to clean up the syntax.
> 
> What I did was a little simpler than how you battled it, I think:
> ran python3 setup.py (to get a python3 based installation of weewx)
> installed all the extensions I use
> checked each of the extensions with "2to3" which so far has done a great job 
> finding python3 edits needed
> ran "2to3 -w" for the extensions needing tweaking
> restarted weewx and verified everything worked (or at least didn't crash out 
> due to python3)
> provided pull requests upstream for anything I found that didn't work as-is 
> in both python2+3
> So far the only thing I can't get to do anything is the forecast extension.  
> I got it to not blow up, but it isn't downloading the forecasts successfully. 
>   This one was a low enough priority for me that I'm just going to wait until 
> the official version catches up someday.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-development/55c86fc3-3c08-4b7c-8314-3b329735eb4b%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/88CD9A88-5A03-410F-8F1A-DF368F0F2086%40johnkline.com.

Reply via email to