cheetah error a/ upgrade to v4.0.0b9 commit a85e320c

१५० भ्यु
नपढिएको पहिलो सन्देशमा जानुहोस्

P Simmons

नपढिएको,
२०२० जनवरी २२, २१:०४:२५२०/१/२२
प्रापक weewx-user
Howdy! I had no problems using v4.0.0b6 but decided to upgrade to v4.0.0b9.

I'm now having problems with report generation.

Here are my (sanitized) conf and log files.

Thank you,
Paul

wee-debug.2019-01-22.txt
weewx-2019-01-22.log

Thomas Keffer

नपढिएको,
२०२० जनवरी २२, २१:२०:५७२०/१/२२
प्रापक weewx-user
Thanks, Paul

Could you temporarily replace your copy of units.py with the attached? It will log some clues about what's causing the decode error.



--
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/09a70440-5968-43ba-a1ef-6ee23306f2d2%40googlegroups.com.
units.py

gjr80

नपढिएको,
२०२० जनवरी २२, २१:४४:३४२०/१/२२
प्रापक weewx-user
Hmm, noticed the same error on my 4.0/python 2 VM. All was fine around 10am my time on 20 January and the error is there 9am on 21 January. This VM is not run continuously but shutdown at night and started each time it's needed. The first thing after startup is a git pull from development. When I look at the commits since 18-19 January I don't see many (and most are mine :( ), though none seem contentious. Will be interesting to see the cause.

Gary

On Thursday, 23 January 2020 12:20:57 UTC+10, Thomas Keffer wrote:
Thanks, Paul

Could you temporarily replace your copy of units.py with the attached? It will log some clues about what's causing the decode error.



On Wed, Jan 22, 2020 at 6:04 PM P Simmons <mbat...@gmail.com> wrote:
Howdy! I had no problems using v4.0.0b6 but decided to upgrade to v4.0.0b9.

I'm now having problems with report generation.

Here are my (sanitized) conf and log files.

Thank you,
Paul

--
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...@googlegroups.com.

P Simmons

नपढिएको,
२०२० जनवरी २२, २२:०१:४७२०/१/२२
प्रापक weewx-user


On Wednesday, January 22, 2020 at 8:20:57 PM UTC-6, Thomas Keffer wrote:
Thanks, Paul

Could you temporarily replace your copy of units.py with the attached? It will log some clues about what's causing the decode error.




TK: Wilco - but tomorrow (sorry for delay).

Thanks!

P.

gjr80

नपढिएको,
२०२० जनवरी २२, २२:१६:०२२०/१/२२
प्रापक weewx-user
Hmm, looks like the extra log line is itself producing an error:

Jan 23 13:10:14 stretch40 weewx[1174] INFO weewx.manager: Added record 2020-01-23 13:10:00 AEST (1579749000) to database 'weewx.sdb'
Jan 23 13:10:14 stretch40 weewx[1174] INFO weewx.manager: Added record 2020-01-23 13:10:00 AEST (1579749000) to daily summary in 'weewx.sdb'
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.units: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: Generate failed with exception '
<type 'exceptions.UnicodeDecodeError'>'
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: **** Ignoring template /home/weewx/skins/Seasons/index.html.tmpl
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: **** Reason: '
ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 329, in generate
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "_home_weewx_skins_Seasons_index_html_tmpl.py", line 214, in respond
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in _handleCheetahInclude
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "_home_weewx_skins_Seasons_current_inc.py", line 355, in respond
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 642, in filter
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      filtered = six.text_type(val)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 1051, in __str__
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      return self.toString()
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 1046, in toString
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      localize=localize)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 778, in toString
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      log.error("val_str=%s; type(val_str)=%s; s=%s; type(s)=%s" % (val_str, type(val_str), s, type(s)))
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.units: '
ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: Generate failed with exception '<type 'exceptions.UnicodeDecodeError'>'
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: **** Ignoring template /home/weewx/skins/Seasons/rss.xml.tmpl
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: **** Reason: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 329, in generate
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "_home_weewx_skins_Seasons_rss_xml_tmpl.py", line 131, in respond
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 642, in filter
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      filtered = six.text_type(val)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 1051, in __str__
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      return self.toString()
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 1046, in toString
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      localize=localize)
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 778, in toString
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****      log.error("val_str=%s; type(val_str)=%s; s=%s; type(s)=%s" % (val_str, type(val_str), s, type(s)))
Jan 23 13:10:15 stretch40 weewx[1174] ERROR weewx.cheetahgenerator: ****  UnicodeDecodeError: '
ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 23 13:10:15 stretch40 weewx[1174] INFO weewx.cheetahgenerator: Generated 6 files for report SeasonsReport in 0.41 seconds
Jan 23 13:10:15 stretch40 weewx[1174] INFO weewx.imagegenerator: Generated 14 images for SeasonsReport in 0.14 seconds
Jan 23 13:10:15 stretch40 weewx[1174] INFO weewx.reportengine: Copied 5 files to /home/weewx/public_html

Gary

Thomas Keffer

नपढिएको,
२०२० जनवरी २३, ०८:३५:५४२०/१/२३
प्रापक weewx-user
Grumble!

Try this one.



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

gjr80

नपढिएको,
२०२० जनवरी २३, १८:२२:१४२०/१/२३
प्रापक weewx-user
That got it!

Gary

Jan 24 09:10:51 stretch40 weewx[777] INFO weewx.engine: Starting main packet loop.
Jan 24 09:15:16 stretch40 weewx[777] INFO weewx.manager: Added record 2020-01-24 09:15:00 AEST (1579821300) to database 'weewx.sdb'
Jan 24 09:15:16 stretch40 weewx[777] INFO weewx.manager: Added record 2020-01-24 09:15:00 AEST (1579821300) to daily summary in 'weewx.sdb'
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: val_str=0.3
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: type(val_str)=<type '
unicode'>
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: s=°C
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: type(s)=<type '
str'>
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: Generate failed with exception '
<type 'exceptions.UnicodeDecodeError'>'
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: **** Ignoring template /home/weewx/skins/Seasons/index.html.tmpl
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: **** Reason: '
ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 329, in generate
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "_home_weewx_skins_Seasons_index_html_tmpl.py", line 214, in respond
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in _handleCheetahInclude
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "_home_weewx_skins_Seasons_current_inc.py", line 355, in respond
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 642, in filter
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      filtered = six.text_type(val)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 1054, in __str__
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      return self.toString()
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 1049, in toString
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      localize=localize)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 775, in toString
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      val_str += s
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: '
ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: val_str=0.3
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: type(val_str)=<type 'unicode'>
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: sC
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.units: type(s)=<type 'str'>
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: Generate failed with exception '<type 'exceptions.UnicodeDecodeError'>'
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: **** Ignoring template /home/weewx/skins/Seasons/rss.xml.tmpl
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: **** Reason: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 329, in generate
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "_home_weewx_skins_Seasons_rss_xml_tmpl.py", line 131, in respond
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 642, in filter
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      filtered = six.text_type(val)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 1054, in __str__
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      return self.toString()
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 1049, in toString
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      localize=localize)
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****    File "/home/weewx/bin/weewx/units.py", line 775, in toString
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****      val_str += s
Jan 24 09:15:17 stretch40 weewx[777] ERROR weewx.cheetahgenerator: ****  UnicodeDecodeError: '
ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Jan 24 09:15:17 stretch40 weewx[777] INFO weewx.cheetahgenerator: Generated 6 files for report SeasonsReport in 0.42 seconds
Jan 24 09:15:17 stretch40 weewx[777] INFO weewx.imagegenerator: Generated 14 images for SeasonsReport in 0.13 seconds
Jan 24 09:15:17 stretch40 weewx[777] INFO weewx.reportengine: Copied 5 files to /home/weewx/public_html



On Thursday, 23 January 2020 23:35:54 UTC+10, Thomas Keffer wrote:
Grumble!

Try this one.

Thomas Keffer

नपढिएको,
२०२० जनवरी २३, १८:३७:०४२०/१/२३
प्रापक weewx-user
OK, now we know what went wrong, but we don't know why.

What version of ConfigObj are you using?

python2 -c "import configobj; print(configobj.__version__)"

-tk



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

gjr80

नपढिएको,
२०२० जनवरी २३, १८:३८:३१२०/१/२३
प्रापक weewx-user
5.0.6

gary@stretch40:~/src/weewx$ python2 -c "import configobj; print(configobj.__version__)"
5.0.6

Gary
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Thomas Keffer

नपढिएको,
२०२० जनवरी २३, १८:५५:२०२०/१/२३
प्रापक weewx-user
Just as I suspected. The patch that fixed things for configobj v4.7.2, broke v5.0.6. 

Can't help but feel that I'm approaching this all wrong. Got to give it a deep think.

-tk

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/6a38344c-aa3e-4d86-9425-e3fb1dda875b%40googlegroups.com.

Thomas Keffer

नपढिएको,
२०२० जनवरी २३, २०:०७:४१२०/१/२३
प्रापक weewx-user
Try replacing your version of weewx/defaults.py with the attached and see if that helps.

Bit of a hack. I'll keep searching for something more elegant.
defaults.py

Thomas Keffer

नपढिएको,
२०२० जनवरी २३, २०:१६:५२२०/१/२३
प्रापक weewx-user
Rats. Try this version.
defaults.py

gjr80

नपढिएको,
२०२० जनवरी २३, २०:३०:४१२०/१/२३
प्रापक weewx-user
Ha, first version worked fine! Second version was fine too. Checked under both python 2 and 3.

Gary
Rats. Try this version.

सन्देश मेटिएको छ

Brent Dowell

नपढिएको,
२०२० जनवरी २३, २१:४६:३१२०/१/२३
प्रापक weewx-user
Just installed version 4 on my PI 4, and hit this error. Came to google groups and you'd already fixed it. Awesome.
Rats. Try this version.

P Simmons

नपढिएको,
२०२० जनवरी २३, २३:४८:४०२०/१/२३
प्रापक weewx-user

Updated to db1b41e, problem solved.

Thanks!

Paul

Thomas Keffer

नपढिएको,
२०२० जनवरी २४, १८:३४:१४२०/१/२४
प्रापक weewx-user
Could you all do a pull and give it another try? The flow path between byte strings and unicode are more controlled now, making the results less prone to decode errors.

At least, that's the theory!

-tk

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

gjr80

नपढिएको,
२०२० जनवरी २४, १९:११:०२२०/१/२४
प्रापक weewx-user
Fine for me under both python2 and 3.

Gary

On Saturday, 25 January 2020 09:34:14 UTC+10, Thomas Keffer wrote:
Could you all do a pull and give it another try? The flow path between byte strings and unicode are more controlled now, making the results less prone to decode errors.

At least, that's the theory!

-tk

On Thu, Jan 23, 2020 at 8:48 PM P Simmons <mbat...@gmail.com> wrote:

Updated to db1b41e, problem solved.

Thanks!

Paul

--
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...@googlegroups.com.

P Simmons

नपढिएको,
२०२० जनवरी २४, २३:२८:०२२०/१/२४
प्रापक weewx-user


On Friday, January 24, 2020 at 5:34:14 PM UTC-6, Thomas Keffer wrote:
Could you all do a pull and give it another try? The flow path between byte strings and unicode are more controlled now, making the results less prone to decode errors.

At least, that's the theory!

-tk

My weewx machine defaults to Python 2.7.13 .

I pulled and installed weewx-4.0.0b10 at commit 00609bf .

Everything still fine.

Thanks for your work, tk... Thanks for your testing, Gary! 

Paul

G Hammer

नपढिएको,
२०२० जनवरी २६, १३:०४:३४२०/१/२६
प्रापक weewx-user
I just finished a new install on a new machine.
b10 works fine with Python 2.7.17 and default skin.


On Friday, January 24, 2020 at 6:34:14 PM UTC-5, Thomas Keffer wrote:
Could you all do a pull and give it another try? The flow path between byte strings and unicode are more controlled now, making the results less prone to decode errors.

At least, that's the theory!

-tk

On Thu, Jan 23, 2020 at 8:48 PM P Simmons <mbat...@gmail.com> wrote:

Updated to db1b41e, problem solved.

Thanks!

Paul

--
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...@googlegroups.com.
सबैलाई जवाफ पठाउनुहोस्
लेखकलाई जवाफ
फर्वार्ड गर्नुहोस्
0 नयाँ म्यासेजहरू