Forecast extension errors after installing V4

392 views
Skip to first unread message

Howard Walter

unread,
May 7, 2020, 4:39:22 PM5/7/20
to weewx-user
Decided to try V4 with Python 3. Installed on a freshly built Raspberry Pi 4 using setup.py. This install was not an upgrade. First run with the Simulator worked great.
Next step was to install Matt's Forecast extension and I followed the instructions on the weewx wiki:
wee_extension --install weewx-forecast.zip (the instructions still refer to a weewx-forecast-x.y.tgz type file)
Removed all the forecasts except NWS from weewx.conf and configured NWS for my area.
Restart weewx and
May 7 12:24:11 wxn weewx[7815] INFO weewx.engine: Starting main packet loop.
May 7 12:25:16 wxn weewx[7815] INFO weewx.manager: Added record 2020-05-07 12:25:00 PDT (1588879500) to database 'weewx.sdb'
May 7 12:25:16 wxn weewx[7815] INFO weewx.manager: Added record 2020-05-07 12:25:00 PDT (1588879500) to daily summary in 'weewx.sdb'
May 7 12:25:17 wxn weewx[7815] INFO weewx.engine: Main loop exiting. Shutting engine down.
May 7 12:25:17 wxn weewx[7815] DEBUG weewx.restx: Shut down StationRegistry thread.
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: Caught unrecoverable exception:
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** '>' not supported between instances of 'float' and 'NoneType'
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** Traceback (most recent call last):
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 195, in run
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** self.dispatchEvent(weewx.Event(weewx.CHECK_LOOP, packet=packet))
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** callback(event)
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 578, in check_loop
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** raise BreakLoop
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** weewx.engine.BreakLoop
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: ****
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** During handling of the above exception, another exception occurred:
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: ****
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** Traceback (most recent call last):
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 594, in post_loop
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** self._catchup(self.engine.console.genArchiveRecords)
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 638, in _catchup
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** for record in generator(lastgood_ts):
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/drivers/__init__.py", line 30, in genArchiveRecords
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** raise NotImplementedError("Method 'genArchiveRecords' not implemented")
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** NotImplementedError: Method 'genArchiveRecords' not implemented
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: ****
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** During handling of the above exception, another exception occurred:
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: ****
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** Traceback (most recent call last):
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewxd", line 154, in main
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** engine.run()
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 202, in run
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** callback(event)
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 596, in post_loop
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** self._software_catchup()
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 658, in _software_catchup
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** origin='software'))
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/weewx/engine.py", line 224, in dispatchEvent
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** callback(event)
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** File "/home/weewx/bin/user/forecast.py", line 1212, in update_forecast
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** elif time.time() - self.interval > self.last_ts:
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** TypeError: '>' not supported between instances of 'float' and 'NoneType'
May 7 12:25:17 wxn weewx[7815] CRITICAL __main__: **** Exiting.

The syslog output with debug=2 and the wee_debug --info are attached.

Thanks for your help.



wee_debug
syslog

John Kline

unread,
May 7, 2020, 10:21:56 PM5/7/20
to weewx...@googlegroups.com
I have a fork that I’ve been using successfully for months.  Others here have also used it with success.

Grab it from here:

I believe I’ve tested it with everything but WU.  WU has changed their API.

-John

On May 7, 2020, at 1:39 PM, Howard Walter <hwal...@gmail.com> wrote:


--
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/9ddfd919-e6a1-411b-af25-0ea5bfb97a5e%40googlegroups.com.
<wee_debug>
<syslog>

Howard Walter

unread,
May 8, 2020, 5:59:49 PM5/8/20
to weewx-user
Thanks the pointer John. I downloaded and installed your version.

The previous errors have disappeared but unfortunately there are new ones:
(I missed the syslog lines from the NWS download but attached the forecast database)
May  8 13:52:46 wxn wee_reports[13949] DEBUG weewx.reportengine: Running report 'forecast'
May  8 13:52:46 wxn wee_reports[13949] DEBUG weewx.reportengine: Found configuration file /home/weewx/skins/forecast/skin.conf for report 'forecast'
May  8 13:52:46 wxn wee_reports[13949] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'user.forecast.ForecastVariables']
May  8 13:52:46 wxn wee_reports[13949] DEBUG weewx.manager: Daily summary version is 2.0
May  8 13:52:47 wxn wee_reports[13949] DEBUG user.forecast: MainThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
May  8 13:52:47 wxn wee_reports[13949] DEBUG user.forecast: MainThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
May  8 13:52:47 wxn wee_reports[13949] DEBUG user.forecast: MainThread: _get_max: '>' not supported between instances of 'NoneType' and 'float'
May  8 13:52:47 wxn wee_reports[13949] DEBUG user.forecast: MainThread: _get_min: '<' not supported between instances of 'NoneType' and 'float'
May  8 13:52:47 wxn wee_reports[13949] DEBUG user.forecast: MainThread: _get_max: '>' not supported between instances of 'NoneType' and 'float'
May  8 13:52:47 wxn wee_reports[13949] DEBUG user.forecast: MainThread: _get_stats: '>' not supported between instances of 'NoneType' and 'float'
May  8 13:52:47 wxn wee_reports[13949] DEBUG user.forecast: MainThread: _get_max: '>' not supported between instances of 'NoneType' and 'float'
May  8 13:52:47 wxn wee_reports[13949] DEBUG user.forecast: MainThread: _get_min: '<' not supported between instances of 'NoneType' and 'float'



forecast.sdb

John Kline

unread,
May 8, 2020, 8:05:01 PM5/8/20
to weewx...@googlegroups.com
Please:
1. Shutdown weewx
2. Delete forecast.py in <weewx_dir>/bin/user
3. Delete the forecast directory (rm -rf <weewx_dir>/skin/forecast)
4. Install forecast again.
5. Start weewx.

If you are still getting this error, please post a sanitized copy of your weewx.conf.
If you are making changes to the forecast skin itself, please post those diffs.

On May 8, 2020, at 2:59 PM, Howard Walter <hwal...@gmail.com> wrote:


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

Howard Walter

unread,
May 8, 2020, 11:20:37 PM5/8/20
to weewx-user
I thought I had done all the steps you suggested but I went back and did them again. Also deleted forecast.sdb.

Same problems. Attached are the syslog and the weewx.conf file.

syslog
weewx.conf

John Kline

unread,
May 9, 2020, 1:47:56 AM5/9/20
to weewx...@googlegroups.com
I tried really hard to reproduce this.  I went through the steps I asked you to do.
I tried deleting the forecast database (since you did).
I tried starting with no databases at all to start.
I tried the the Simulator driver (since you sent me that config).
I tried your NWS entries.

I noted you are using the Simulator.  Is this a clean install of WeeWX 4 with only the forecast extension added?  Have you installed xtide?

On May 8, 2020, at 8:20 PM, Howard Walter <hwal...@gmail.com> wrote:


I thought I had done all the steps you suggested but I went back and did them again. Also deleted forecast.sdb.

Same problems. Attached are the syslog and the weewx.conf file.

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

Howard Walter

unread,
May 9, 2020, 11:35:54 AM5/9/20
to weewx-user
John, Thanks very much for all your time. No, xtide was not installed and it was otherwise a fresh install.

I did use wee_extension --uninstall to uninstall Matt's version of Forecast so maybe that had a side effect.

Am blowing away my weewx install and starting from scratch.

John Kline

unread,
May 9, 2020, 11:54:46 AM5/9/20
to weewx...@googlegroups.com
Hi Howard,

Please keep notes on how your install.  If you still have the issue, that info will be useful to recreate the problem on my end.

I asked about xtide because I never tested without it installed; but don’t install it because it’s useful to test without.

After I hear back from you, I’ll test on a clean computer with your steps.

On May 9, 2020, at 8:35 AM, Howard Walter <hwal...@gmail.com> wrote:


John, Thanks very much for all your time. No, xtide was not installed and it was otherwise a fresh install.

I did use wee_extension --uninstall to uninstall Matt's version of Forecast so maybe that had a side effect.

Am blowing away my weewx install and starting from scratch.

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

Howard Walter

unread,
May 9, 2020, 4:40:29 PM5/9/20
to weewx-user
Re-install with the same errors.

Raspberry Pi 4 with 4GB memory. Booting to a 1GB hard drive.
Raspbian 2020-02-13-raspbian-buster-lite.img on the boot sdcard.
Raspbian 2020-02-05-raspbian-buster.img on the hard drive. (Different Raspbians so the PARTUUIDs are different)
Used to run the hard drive off a powered USB hub on Pi 3's but read that the Pi 4 with the Pi 3amp supply could power a hard drive.

Here is my procedure:
sudo apt update
sudo apt install
# required packages. 
sudo apt install python3-configobj
sudo apt install python3-cheetah
sudo apt install python3-pil
sudo apt install python3-serial
sudo apt install python3-usb
sudo apt install python3-pip
sudo apt install python3-ephem

sudo mkdir /home/weewx
sudo chown pi:pi /home/weewx

# Weewx install
tar xvfz weewx-X.Y.Z.tar.gz 
cd weewx-X.Y.Z
python3 ./setup.py build
sudo python3 ./setup.py install
     Location: Concord, CA USA
     Altitude: 49, foot
     Lat: 37.965717
     Long: -122.0373
     y
     Units: us
     For type of station, enter simulator (for now)

mkdir /home/weewx/archive
Add /home/weewx to owncloud ~/Cloud and exclude archive.
After owncloud deletes archive, re-create it.
Run simulator to test install

cd /home/weewx
wget -O weewx-forecast.zip https://github.com/chaunceygardiner/weewx-forecast/archive/master.zip
wee_extension --install weewx-forecast.zip
emacs weewx.conf and delete all forecasts except NWS.
     debug = 2
add      [[NWS]]
     lid = "CAZ510"
     foid = "MTR"
Run simulator to test install
weewx.conf

Howard Walter

unread,
May 9, 2020, 4:47:35 PM5/9/20
to weewx-user
Forgot to add that sudo python3 ./setup.py install
leaves all the weewx subdirs owned by root so a
sudo chown -R pi:pi /home/weewx
is required.

Python is Python 3.7.3 (Default, Dec 20,2019, 18:57:59)

John Kline

unread,
May 9, 2020, 5:30:36 PM5/9/20
to weewx...@googlegroups.com
OK, I installed on an RPi 4 4GB up to date buster machine.
I installed weewx from setup.py — shouldn’t matter.
I did not do debug = 2 — shouldn’t matter.
I did not do the owncloud stuff (which I don’t believe you mentioned before).

I see no errors whatsoever.

I need you to try again, but skip the owncloud step so we can compare apples to apples.  If something is going wrong trying to get to the archive, I can see getting a null and you seeing those errors; so please try this and get back to me.

On May 9, 2020, at 1:47 PM, Howard Walter <hwal...@gmail.com> wrote:


--
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.
Message has been deleted

John Kline

unread,
May 9, 2020, 8:07:09 PM5/9/20
to weewx...@googlegroups.com
Hmm, this appears to be an empty reply.

On May 9, 2020, at 5:04 PM, Howard Walter <hwal...@gmail.com> wrote:


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

Howard Walter

unread,
May 9, 2020, 8:17:17 PM5/9/20
to weewx-user
First, I apologize for not mentioning the owncloud config earlier.
After seeing your email, I did a face palm and thought of course I must have messed up the owncloud config and it was changing something during the install. Unfortunately, that was not the case.
Completely disabled owncloud and re-installed weewx from scratch. Got the same forecast error messages.
Decided to go back to the basics:
Re-imaged an sdcard with raspbian buster and booted. (No hard drive)
Updated the os, installed weewx and forecast. Same error messages!!
Now I am really confused.

The only thing that I can think of is
wget -O weewx-forecast.zip https://github.com/chaunceygardiner/weewx-forecast/archive/master.zip  
the version that you are using?

John Kline

unread,
May 9, 2020, 8:38:09 PM5/9/20
to weewx...@googlegroups.com
I cut and pasted:
from your email.

Perhaps the difference is the debian install of WeeWX?

Will you try the setup.py method downloading WeeWX from the the weewx.com site?

Then follow steps 3 and 4 here (it will install to /home/weewx — which you can delete later):

You can just run from the command line in step 4; but install forecast extension before running weewx.

Ignore the output in the terminal (which presumably will just be loop packets) and check the log for the errors you are seeing.

On May 9, 2020, at 5:17 PM, Howard Walter <hwal...@gmail.com> wrote:


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

Howard Walter

unread,
May 9, 2020, 8:51:10 PM5/9/20
to weewx-user
Sorry if I wasn't clear. I am not using the Debian install.

I am downloading http://www.weewx.com/downloads/weewx-4.0.0.tar.gz and installing using setup.py.

Your download below says that you cut and pasted 

I am using 

wget -O weewx-forecast.zip https://github.com/chaunceygardiner/weewx-forecast/archive/master.zip

Are they the same?

John Kline

unread,
May 9, 2020, 9:07:08 PM5/9/20
to weewx...@googlegroups.com
I have verified from my history that I installed:
You installed using setup.py and got those errors!
Did /home/weewx already exist?  If so, would you move it out of the say and try again?
Also, would you skip the permissions changes you have been doing?  That could be getting in the way.  Setup.py installs as root in step 3.  Then run it as root, from the command line, as you see in step 4.

On May 9, 2020, at 5:51 PM, Howard Walter <hwal...@gmail.com> wrote:


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

Howard Walter

unread,
May 10, 2020, 11:38:44 AM5/10/20
to weewx-user
Yes, I only use setup.py because I need to change some of the weewx source for my 1-wire weather station. Does this mean that you have been installing on the Rpi with the Deb package?
If so, I will try the Deb install later today.

Blew away /home/weewx and re-installed by downloading a fresh copy of weewx-4.0.0 and running .setup.py using python3.
It created a new /home/weewx which is owned by root. Had to use sudo wee_extension --install for your Forecast extension since /home/weewx is owned by root.
Edited weewx.conf to setup NWS and ran sudo ./bin/weewxd.
Still get the same forecast errors.


John Kline

unread,
May 10, 2020, 12:00:57 PM5/10/20
to weewx...@googlegroups.com
Nope.  I always use setup.py.

You weren’t using wee_extension install before?  That didn’t sink in before; but it doesn’t matter since you’ve tried it.

This story simply doesn’t add up.  Something is going wrong and you’re getting a null where no one else using this extension is.  Of course, the code should be detecting the problem earlier and giving a meaningful error message, but this isn’t my extension.  I simply added a check for null every time I encountered the illegal (Py3) comparison (in addition to converting the code to Py3 and WeeWX 4).  I could go through the code and check for null on every comparison, but I’m not inclined to do that.  It would be a mess.  I would be more inclined to rewrite the whole thing, but I’d rather not as it’s been working fine for me and others.

If you’re really sure you have a completely clean /home/weewx tree; the only other thing I would suggest is that you do nothing to /home/weewx/weewx.conf but add your NWS lid and foid.  Don’t make any other changes.  Remove no entries anywhere, just fill in the lid and foid.  If you still get the same result, perhaps this will remain a mystery.

On May 10, 2020, at 8:38 AM, Howard Walter <hwal...@gmail.com> wrote:


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

John Kline

unread,
May 10, 2020, 12:07:24 PM5/10/20
to weewx...@googlegroups.com
BTW, do you have six installed?

On May 10, 2020, at 9:00 AM, John Kline <jo...@johnkline.com> wrote:



p q

unread,
May 10, 2020, 12:09:42 PM5/10/20
to weewx-user
To remove one more variable -I'm using the same NWS lid and foid with Weewx 4 on a rasberry pi. I'm using the older OS and Python 2, though.

I'm not getting any problems once I switched to the updated forecast extension.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

John Kline

unread,
May 10, 2020, 12:13:53 PM5/10/20
to weewx...@googlegroups.com
I think pip installing six (IIRC, “pip3 install six”) might very well be the issue.  I forgot to add this in the installation instructions.  And the code likes to swallow exceptions, so you might not see the error that the six package wasn’t found.

On May 10, 2020, at 9:07 AM, John Kline <jo...@johnkline.com> wrote:



John Kline

unread,
May 10, 2020, 12:51:34 PM5/10/20
to weewx...@googlegroups.com
I see that all of my buster machines have the debian python3-pip installed.
apt install python3-pip


On May 10, 2020, at 9:13 AM, John Kline <jo...@johnkline.com> wrote:



Howard Walter

unread,
May 10, 2020, 2:12:49 PM5/10/20
to weewx-user
You weren’t using wee_extension install before?
I have always used wee_extension.
If you’re really sure you have a completely clean /home/weewx tree; the only other thing I would suggest is that you do nothing to /home/weewx/weewx.conf but add your NWS lid and foid.  Don’t make any other changes.
sudo rm -rf /home/weewx before each new install. Last time, I added the lid and foid and only changed the debug level to 2. Same errors.
pip3 install six returns
Requirement already satisfied: six in /usr/lib/python3/dist-packages (1.12.0)

Yes, I agree that this should remain a mystery for now. Thanks very much for all the time and effort that you have invested.

In the next day or so, I am going to retry the install with python2.

Howard Walter

unread,
May 11, 2020, 10:22:44 PM5/11/20
to weewx-user
Success!!
Installing weewx with python2.7 and using John's https://github.com/chaunceygardiner/weewx-forecast, weewx ran with no errors and the forecast skin showed NWS data.
Unfortunately, Matt's forecast.py still had errors with python2.7.

I'll file weewx bug reports for forecast.py and leaving the /home/weewx owned by root.

Thanks again to everyone for their help.
Reply all
Reply to author
Forward
0 new messages