Generate failed with exception '<class 'TypeError'>'

49 views
Skip to first unread message

Mike Revitt

unread,
Jan 19, 2021, 12:44:18 PM1/19/21
to weewx-user
I have just completed a clean and new install of 4.3.0 onto a Debian 10 host running on an ARM processor.

I used setup.py, but left everything as the default and ran the following commands

python3 setup.py build

python3 setup.py install --no-prompt

On starting I get all the images but only tabular.html and these errors in the log file, which repeats a lot. Any ideas?

Jan 19 17:34:56 Debian-1 weewx[1055] INFO weewx.engine: Starting main packet loop.
Jan 19 17:35:16 Debian-1 weewx[1055] INFO weewx.manager: Added record 2021-01-19 17:35:00 UTC (1611077700) to database 'weewx.sdb'
Jan 19 17:35:16 Debian-1 weewx[1055] INFO weewx.manager: Added record 2021-01-19 17:35:00 UTC (1611077700) to daily summary in 'weewx.sdb'
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: Generate failed with exception '<class 'TypeError'>'
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** Ignoring template /home/weewx/skins/Seasons/NOAA/NOAA-%Y-%m.txt.tmpl
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** Reason: unhashable type: 'list'
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** Traceback (most recent call last):
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/cheetahgenerator.py", line 323, in generate
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** unicode_string = compiled_template.respond()
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** File "_home_weewx_skins_Seasons_NOAA_NOAA__Y__m_txt_tmpl.py", line 392, in respond
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/cheetahgenerator.py", line 650, in filter
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** filtered = six.text_type(val)
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/units.py", line 1133, in __str__
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** s = self.toString()
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/units.py", line 1124, in toString
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** vtx = self._raw_value_tuple
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/units.py", line 1177, in _raw_value_tuple
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** vtx = self.converter.convert(self.value_t)
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/units.py", line 966, in convert
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** new_val_t = convert(val_t, new_unit_type)
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** File "/home/weewx/bin/weewx/units.py", line 1315, in convert
Jan 19 17:35:16 Debian-1 weewx[1055] ERROR weewx.cheetahgenerator: **** conversion_func = conversionDict[val_t[1]][target_unit_type]

Tom Keffer

unread,
Jan 19, 2021, 1:20:47 PM1/19/21
to weewx-user
Assuming that you have not modified skin.conf for the Seasons skin, may we see your section [StdReport] in /home/weewx/weewx.conf?

I suspect something that should be a scalar is actually a list. Perhaps due to a trailing comma somewhere...?

--
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/e7b642e1-b1e4-493e-84b2-2299a6fd4880n%40googlegroups.com.

vince

unread,
Jan 19, 2021, 1:23:34 PM1/19/21
to weewx-user
Just a guess but did you mess with which units or locale settings ?   You're in the UK, correct ?

If you can try a test, run my debian10 provisioner script (link) after stopping weewx and moving your existing /home/weewx tree aside.  This will also install+configure nginx so you might want to comment out those parts of the script if you already have your webserver installed+setup.

Mike Revitt

unread,
Jan 20, 2021, 3:47:45 AM1/20/21
to weewx-user
Thanks all,

You gave me the pointers on where to look and the issue was the sed command I was using, it as also updating group_altitude

sed -i "s:altitude =.*:altitude = $WEEWX_ALTITUDE:g"    /home/weewx/weewx.conf

Changing it to 

sed -i "s: altitude =.*: altitude = $WEEWX_ALTITUDE:g"    /home/weewx/weewx.conf

fixed the problem.

I was also meaning to send you a note Vince as I did indeed create my User-Data script off of your script and was going to say I had an improvement for you over the sed commands you use. These now work and are



sed -i 's: location =.*: location = "'"$WEEWX_NAME"'":g' /home/weewx/weewx.conf
sed -i "s: longitude =.*: longitude = $WEEWX_LONGITUDE:g" /home/weewx/weewx.conf
sed -i "s: latitude =.*: latitude = $WEEWX_LATITUDE:g" /home/weewx/weewx.conf
sed -i "s: altitude =.*: altitude = $WEEWX_ALTITUDE:g" /home/weewx/weewx.conf
sed -i "s: archive_interval =.*: archive_interval = 60:g" /home/weewx/weewx.conf

The space after the colon is very important as I discovered.

This is my User-Data script if you are interested, also sets up the environment and installs RDP so I can Remote Desktop in

UserData-Debian-WeeWX.sh
Reply all
Reply to author
Forward
0 new messages