Belchertown Development & WeeWX 4 b10 Error

359 views
Skip to first unread message

G Hammer

unread,
Feb 7, 2020, 5:01:17 PM2/7/20
to weewx-user
I have been running b10 with no issues and today downloaded the dev version of the Belchertown skin.
I added the needed config and then ran WeeWX. I had issues when reports were run.
See attached files.


Belchertown Errors.txt

vince

unread,
Feb 7, 2020, 5:53:18 PM2/7/20
to weewx-user
We'd need to have far more detail.

  • python3 or python2 ?
  • what version of belchertown ?
  • what os ?
  • setup.py or dpkg or rpm or ???

 

G Hammer

unread,
Feb 7, 2020, 6:30:41 PM2/7/20
to weewx...@googlegroups.com
Python 2
4.0.0b10
setup.py
Mint 19.3

Development branch of Belchertown from today 7 Feb


--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/AQ8Xw5K9PFo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/beb85170-03d9-464c-866e-3c61c9267776%40googlegroups.com.

vince

unread,
Feb 7, 2020, 7:25:20 PM2/7/20
to weewx-user
On Friday, February 7, 2020 at 3:30:41 PM UTC-8, G Hammer wrote:
Python 2
4.0.0b10
setup.py
Mint 19.3

Development branch of Belchertown from today 7 Feb



ok - I just installed a Vagrant box with absolute latest weewx and belchertown and it works fine (python3 here over stretch64 Debian in the vm)
 

G Hammer

unread,
Feb 7, 2020, 9:08:03 PM2/7/20
to weewx-user
I believe the error is related to a python3 vs python 2 issue. Look at the path it is trying to write to:  the u' is odd.
Feb  7 16:50:26 srvr weewx[23592] ERROR weewx.reportengine:         ****  Warning: Error writing forecast info to /home/weewx/public_html/weather/belchertown/json/darksky_forecast.json. Reason: [Errno 2] No such file or directory: u'/home/weewx/public_html/weather/belchertown/json/darksky_forecast.json'

Pat

unread,
Feb 7, 2020, 9:36:18 PM2/7/20
to weewx-user
I haven't tried b10 or b11 yet. I'll see if I can find some time this weekend to set it up and try and replicate this. 

vince

unread,
Feb 7, 2020, 9:46:56 PM2/7/20
to weewx-user
On Friday, February 7, 2020 at 6:08:03 PM UTC-8, G Hammer wrote:
I believe the error is related to a python3 vs python 2 issue. Look at the path it is trying to write to:  the u' is odd.
Feb  7 16:50:26 srvr weewx[23592] ERROR weewx.reportengine:         ****  Warning: Error writing forecast info to /home/weewx/public_html/weather/belchertown/json/darksky_forecast.json. Reason: [Errno 2] No such file or directory: u'/home/weewx/public_html/weather/belchertown/json/darksky_forecast.json'



The 'u' tells me that you are maybe running python3 against a python2 branch (master) of belchertown.

If you did a 'git pull' remember to 'git checkout development' before running wee_extension to install it.
 

G Hammer

unread,
Feb 7, 2020, 9:54:24 PM2/7/20
to weewx-user
No, I know which version I'm getting, weewx-belchertown-development and my python is 2.7
Thus, my question.

G Hammer

unread,
Feb 7, 2020, 9:55:15 PM2/7/20
to weewx-user
Thanks Pat.

Congrats on your upcoming baby!

Pat

unread,
Feb 17, 2020, 11:28:34 AM2/17/20
to weewx-user
I'm pretty sure I fixed this error (AttributeError: 'ListOfDicts' object has no attribute 'items'), but can you give it a try? Re-download the development branch and re-install it. Then restart weewx. 

Are you still having the other error (Error writing forecast...)

G Hammer

unread,
Feb 17, 2020, 8:29:32 PM2/17/20
to weewx-user
Thanks for the effort. Yes, the forecast still fails the same way.
Additionally, there are new errors with this version.

See attached file for the pertinent log lines.
Belchertown_Errors_17_Feb.txt

Pat

unread,
Feb 17, 2020, 8:34:16 PM2/17/20
to weewx-user
Ok looks like it's the same error just repeated. I wonder why you're seeing that and I'm not. I'll continue to tinker on a dev machine to try and re-create it. 

G Hammer

unread,
Feb 17, 2020, 8:44:33 PM2/17/20
to weewx-user
The very next archive cycle, this is the result:

Feb 17 20:30:22 srvr weewx[32089] INFO user.belchertown: New forecast file downloaded to /home/weewx/public_html/weather/belchertown/json/darksky_forecast.json
Feb 17 20:30:22 srvr weewx[32089] INFO weewx.restx: CWOP: Published record 2020-02-17 20:30:00 EST (1581989400)
Feb 17 20:30:22 srvr weewx[32089] INFO user.belchertown: Update Checker: New GitHub Version file downloaded to /home/weewx/public_html/weather/belchertown/json/github_version.json
Feb 17 20:30:22 srvr weewx[32089] INFO weewx.restx: Weather365: Published record 2020-02-17 20:30:00 EST (1581989400)
Feb 17 20:30:24 srvr weewx[32089] INFO weewx.cheetahgenerator: Generated 33 files for report Belchertown in 2.86 seconds
Feb 17 20:30:24 srvr weewx[32089] INFO weewx.reportengine: Copied 2 files to /home/weewx/public_html/weather/belchertown


After this, the pages are created normally and all is in place.

I do not have MQTT functionality, but that is something I will look at in a few minutes.
MQTT doesn't even show on the site, no error in connecting, offline, etc. 
I have the Windy pane, but no DarkSky forecast.

All these have to be my config so I'll go recheck everything.

Thanks Pat!


On Monday, February 17, 2020 at 11:28:34 AM UTC-5, Pat wrote:

Pat

unread,
Feb 17, 2020, 8:46:03 PM2/17/20
to weewx-user
Just curious, have you upgraded weewx to 4.0.0b12?

G Hammer

unread,
Feb 17, 2020, 9:22:47 PM2/17/20
to weewx-user
Yes, I have.
WeeWX version: 4.0.0b12
Belchertown Skin Version: 1.1b9

Pat

unread,
Feb 17, 2020, 9:25:33 PM2/17/20
to weewx-user
And things are looking OK right now? Seems like it?

G Hammer

unread,
Feb 18, 2020, 9:08:42 AM2/18/20
to weewx-user
Pat,

While the pages are created now, I have no charts, no history, no MQTT.
There are a number of errors in the dev console I'm attaching 2 here.
home_page.log
reports.log

Pat

unread,
Feb 18, 2020, 9:25:35 AM2/18/20
to weewx-user
Interesting... Remind me of the link to your site?

G Hammer

unread,
Feb 19, 2020, 10:29:19 AM2/19/20
to weewx-user

Pat

unread,
Feb 19, 2020, 12:53:13 PM2/19/20
to weewx-user
I see why, but this is another one I can't replicate. It's an encoding problem again.  Can you verify your belchertown.js.tmpl file has this at the top? #encoding UTF-8

Here's what's causing the error in your compiled belchertown.js file.
               
                var categories = [u'N', u'NNE', u'NE', u'ENE', u'E', u'ESE', u'SE', u'SSE', u'S', u'SSW', u'SW', u'WSW', u'W', u'WNW', u'NW', u'NNW', u'N/A'];


G Hammer

unread,
Feb 20, 2020, 9:00:55 AM2/20/20
to weewx-user
Yes, the encoding was there.

So, here's an idea. What exactly should be installed to run this skin? Meaning, how are you configured?

Pat

unread,
Feb 20, 2020, 9:12:55 PM2/20/20
to weewx-user
It should work in your configuration - weewx 4, python 2. I have this in a virtual machine and it's working fine for me. So I'm not sure what's gone south. 

On my real website, I'm using python 3 and weewx 4. 

But it should work on weewx 3.9.2 with python 2, weewx 4 python 2, and weewx 4 python 3. 

G Hammer

unread,
Feb 20, 2020, 10:46:42 PM2/20/20
to weewx...@googlegroups.com
Perhaps I will save my database and wipe the machine, then reinstall using WeeWX 4 and python 3.

I have an incompatible driver but hopefully I can find a way to correct it before irrigation season starts.

More to come

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/AQ8Xw5K9PFo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

G Hammer

unread,
Mar 8, 2020, 9:29:25 PM3/8/20
to weewx-user
Well, perhaps these are related to my mystery.

Mar  8 21:00:24 srvr weewx[29324] INFO user.belchertown: New forecast file downloaded to /home/weewx/public_html/weather/json/darksky_forecast.json
Mar  8 21:00:24 srvr weewx[29324] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 0.55 seconds
Mar  8 21:00:24 srvr weewx[29324] INFO weewx.reportengine: Copied 2 files to /home/weewx/public_html/weather

So, having no luck in finding why this skin will not produce output, I decided to upload a weewx.conf that uses the Seasons skin. When I stopped weewx, I got an error.
root@srvr:/home/weewx/public_html/weather/json# service weewx stop
sh: 0: getcwd() failed: No such file or directory

Thing is, I had tail -f /var/log/syslog in another window and there was nothing untoward shown.
Simply changing to the root of the filesystem gave the expected results.
root@srvr:/home/weewx/public_html/weather/json# cd /
root@srvr:/# service weewx stop
root@srvr:/# service weewx start

Seasons skin is fine BTW.

Pat

unread,
Mar 8, 2020, 9:43:16 PM3/8/20
to weewx-user
Not much here to go off of. Can you try using a different HTML directory to see if that makes any difference? It looks like it downloaded the forecast file so that good that it's going something.

G Hammer

unread,
Mar 9, 2020, 10:51:20 AM3/9/20
to weewx-user
Changing to public_html/bark produces the same results.
Did you mean out of the public_html directory?

The weewx weather pages are off of my main website which I do not wish to move. I can change the apache config to add another directory structure if needed.
However, as Seasons skin has no problem, I'm think this isn't the issue.

I'm attaching a listing of the files in the directory tree. Maybe that will help a bit.
dirdump

Pat

unread,
Mar 9, 2020, 7:46:05 PM3/9/20
to weewx-user
I'm not looking to have you change the folder permanently, just as a test. I honestly have no idea why the site isn't rendering for you. I guess you could zip it up and attach it and I can unzip it to a lab machine - or provide me a URL to your uploaded belchertown copy and I can see what I can see. 

G Hammer

unread,
Mar 17, 2020, 1:13:32 PM3/17/20
to weewx-user
The issue is resolved by the following:

I installed 
libfreetype6-dev
libjpeg-dev
python-cjson

I uninstalled the skin, made certain the directories were gone, rebooted and installed the skin again.

After configuring, I get full functionality..

The last item is to resolve why my local mosquitto server is not accepting IPv6 websockets.

sudo netstat -tulpn | grep -E '8883|9001'
tcp        0      0 0.0.0.0:8883            0.0.0.0:*               LISTEN      968/mosquitto       
tcp        0      0 0.0.0.0:9001            0.0.0.0:*               LISTEN      968/mosquitto       
tcp6       0      0 :::8883                 :::*                    LISTEN      968/mosquitto

Not a firewall or iptables issue:
root@srvr:~# ufw status
Status: inactive
root@srvr:~# systemctl status iptables-persistent
Unit iptables-persistent.service could not be found.
root@srvr:~# systemctl status iptables
Unit iptables.service could not be found.

I'll note that websockets IPv6 is not shown in the mosquitto startup logs. But I'm not certain websockets would show each type as the other sockets do:
1584380087: mosquitto version 1.4.15 (build date Tue, 18 Jun 2019 11:42:22 -0300) starting
1584380087: Config loaded from /etc/mosquitto/mosquitto.conf.
1584380087: Opening ipv4 listen socket on port 1883.
1584380087: Opening ipv6 listen socket on port 1883.
1584380087: Opening ipv4 listen socket on port 8883.
1584380087: Opening ipv6 listen socket on port 8883.
1584380087: Opening websockets listen socket on port 9001.

Any mosquitto assist would be helpful.
Message has been deleted

G Hammer

unread,
Mar 23, 2020, 2:35:13 PM3/23/20
to weewx-user
Final update on this.
I could find no distro that has IPv6 enabled on their inbuilt websockets. Nor can I find a way to build websockets and enable IPv6.
So, I added a DNS entry pointing at only the IPv4 address, added the host name to my SSL certificate, edited the Belchertown websocket entry to use this host name.

Voila! Fully functional.
May not be the elegant method, but it indeed works fine.



On Wednesday, March 18, 2020 at 12:54:13 PM UTC-4, G Hammer wrote:
It seems that the websockets included with Linux Mint 19.3 does not have IPv6 support compiled into it.
Lousy choice on the part of Linux Mint. 

I hope this might save someone else from the same.

Reply all
Reply to author
Forward
0 new messages