Closed fscwetter closed 5 years ago
Got it. I can't look until later tonight.
On Mon, Jan 7, 2019, 11:27 AM fscwetter notifications@github.com wrote:
weewx.zip https://github.com/poblabs/weewx-belchertown/files/2733436/weewx.zip
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/36#issuecomment-451992720, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUsZ3X3qWioaEHHdSJozTXUGCJUeTNvks5vA3VwgaJpZM4ZygXS .
Initial test, using your database I was able to get the skin to compile correctly.
Jan 7 20:01:05 weewx2019 wee_reports[1923]: Belchertown Extension: version 0.8.2
Jan 7 20:01:05 weewx2019 wee_reports[1923]: cheetahgenerator: Generated 13 files for report Belchertown in 0.71 seconds
Jan 7 20:01:05 weewx2019 wee_reports[1923]: copygenerator: copied 22 files to /var/www/html
Jan 7 20:01:06 weewx2019 wee_reports[1923]: cheetahgenerator: Generated 4 files for report Highcharts_Belchertown in 1.01 seconds
Jan 7 20:01:06 weewx2019 wee_reports[1923]: copygenerator: copied 0 files to /var/www/html
So I changed my locale to de_AT.UTF-8
root@weewx2019:~# env | grep LANG
LANG=de_AT.UTF-8
Re-ran the report and I got an error
Jan 7 20:07:13 weewx2019 wee_reports[2638]: Belchertown Extension: version 0.8.2
Jan 7 20:07:13 weewx2019 wee_reports[2638]: reportengine: Caught unrecoverable exception in generator weewx.cheetahgenerator.CheetahGenerator
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** Traceback (most recent call last):
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** File "/usr/share/weewx/weewx/reportengine.py", line 239, in run
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** obj.start()
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** File "/usr/share/weewx/weewx/reportengine.py", line 273, in start
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** self.run()
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 158, in run
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** ngen = self.generate(gen_dict[section_name], self.gen_ts)
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 232, in generate
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** ngen += self.generate(section[subsection], gen_ts)
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 232, in generate
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** ngen += self.generate(section[subsection], gen_ts)
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 320, in generate
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** default_binding)
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 372, in _getSearchList
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** searchList += obj.get_extension_list(timespan, db_lookup)
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** File "/usr/share/weewx/user/belchertown.py", line 319, in get_extension_list
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** at_rainiest_month = [ calendar.month_name[ int( at_rainiest_month_query[0] ) ] + ", " + at_rainiest_month_query[1], at_rainiest_month_converted ]
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Jan 7 20:07:13 weewx2019 wee_reports[2638]: **** Generator terminated
Jan 7 20:07:13 weewx2019 wee_reports[2638]: copygenerator: copied 22 files to /var/www/html
Jan 7 20:07:14 weewx2019 wee_reports[2638]: cheetahgenerator: Generated 4 files for report Highcharts_Belchertown in 1.02 seconds
Jan 7 20:07:14 weewx2019 wee_reports[2638]: copygenerator: copied 0 files to /var/www/html
I think this is a different error than you were seeing. Not sure why, but right now it seems there's a locale issue I'll have to look into deeper.
this i found and try on belchertown.py
Re: [weewx-user] Re: UnicodeDecodeError: 'ascii' codec can't decode byte Nachricht auf Deutsch übersetzen Unfortunately, I cannot replicate your problem. I used your index.html.tmpl file, and your skin.conf file, and things worked fine.
For Cheetah to recognize that a template uses UTF-8, it must have an 'encoding' directive. You have one, but for some reason it is not recognizing it. Why, I don't know.
Suggestions:
1. Try eliminating the blank line at the top of index.html.tmpl between "#encoding UTF-8" and the "<!DOCTYPE..." directive. I doubt this will do anything, but we're getting desperate. 2. Start with the skin.conf and index.html.tmpl file that come with weewx and gradually add things until you have a problem. 3. Check what default encoding your python installation uses. You can do this by running the line python -c "import sys; print sys.getdefaultencoding()"
Mine says 'ascii', and yours should as well.
1. Try changing the default encoding used by weewx by adding the following to the top of the file user/extensions.py: import sys # Reload sys, because site.py deletes the function setdefaultencoding(). reload(sys) sys.setdefaultencoding('UTF8')
If this works, it's a bit of a hack, but it might get you running. It can also break other things.
-tk get a new error
What locale use you I will try it
I use en utf-8
On Mon, Jan 7, 2019, 3:47 PM fscwetter notifications@github.com wrote:
What locale use you I will try it
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/36#issuecomment-452076291, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUsZwu6rNuLu3BGlcnmWWu6ijltdznUks5vA7JsgaJpZM4ZygXS .
i try with en_GB.UTF-8 UTF-8 get error
Jan 7 21:43:35 raspberrypi weewx[13386]: Starting weewx weather system: weewxTraceback (most recent call last):
Jan 7 21:43:35 raspberrypi weewx[13386]: File "/home/weewx/bin/weewxd", line 12, in <module>
Jan 7 21:43:35 raspberrypi weewx[13386]: import user.extensions #@UnusedImport
Jan 7 21:43:35 raspberrypi weewx[13386]: File "/home/weewx/bin/user/extensions.py", line 18, in <module>
Jan 7 21:43:35 raspberrypi weewx[13386]: locale.setlocale(locale.LC_ALL, '')
Jan 7 21:43:35 raspberrypi weewx[13386]: File "/usr/lib/python2.7/locale.py", line 581, in setlocale
Jan 7 21:43:35 raspberrypi weewx[13386]: return _setlocale(category, locale)
Jan 7 21:43:35 raspberrypi weewx[13386]: locale.Error: unsupported locale setting
Jan 7 21:43:35 raspberrypi weewx[13386]: failed!
Jan 7 21:43:35 raspberrypi systemd[1]: weewx.service: Control process exited, code=exited status=1
Jan 7 21:43:35 raspberrypi systemd[1]: Failed to start LSB: weewx weather system.
Jan 7 21:43:35 raspberrypi systemd[1]: weewx.service: Unit entered failed state.
Did you restart the Pi after changing locale?
I'm USA English too. But GB should work.
On Mon, Jan 7, 2019, 3:50 PM fscwetter notifications@github.com wrote:
i try with en_GB.UTF-8 UTF-8 get error
Jan 7 21:43:35 raspberrypi weewx[13386]: Starting weewx weather system: weewxTraceback (most recent call last): Jan 7 21:43:35 raspberrypi weewx[13386]: File "/home/weewx/bin/weewxd", line 12, in Jan 7 21:43:35 raspberrypi weewx[13386]: import user.extensions
@UnusedImport
Jan 7 21:43:35 raspberrypi weewx[13386]: File "/home/weewx/bin/user/extensions.py", line 18, in Jan 7 21:43:35 raspberrypi weewx[13386]: locale.setlocale(locale.LC_ALL, '') Jan 7 21:43:35 raspberrypi weewx[13386]: File "/usr/lib/python2.7/locale.py", line 581, in setlocale Jan 7 21:43:35 raspberrypi weewx[13386]: return _setlocale(category, locale) Jan 7 21:43:35 raspberrypi weewx[13386]: locale.Error: unsupported locale setting Jan 7 21:43:35 raspberrypi weewx[13386]: failed! Jan 7 21:43:35 raspberrypi systemd[1]: weewx.service: Control process exited, code=exited status=1 Jan 7 21:43:35 raspberrypi systemd[1]: Failed to start LSB: weewx weather system. Jan 7 21:43:35 raspberrypi systemd[1]: weewx.service: Unit entered failed state.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/36#issuecomment-452077043, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUsZ9ayJigYSbE8O9ApJvx4Wcl0-0Koks5vA7MBgaJpZM4ZygXS .
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
and
pi@raspberrypi:~ $ sudo /etc/init.d/weewx restart
[....] Restarting weewx (via systemctl): weewx.serviceJob for weewx.service failed because the control process exited with error code.
See "systemctl status weewx.service" and "journalctl -xe" for details.
failed!
Try en_US.UTF8 and set it as the default/
dpkg-reconfigure locales
His Rpi is messed up. someplace his LANG isn't getting set correctly and causing python to revolt.
@fscwetter are you doing root commands as root or are you using sudo ? This makes a difference on Rpi.
reboot works
Jan 7 22:00:18 raspberrypi weewx[685]: manager: Added record 2019-01-07 22:00:00 CET (1546894800) to database 'weewx.sdb'
Jan 7 22:00:18 raspberrypi weewx[685]: manager: Added record 2019-01-07 22:00:00 CET (1546894800) to daily summary in 'weewx.sdb'
Jan 7 22:00:23 raspberrypi weewx[685]: cheetahgenerator: Generated 12 files for report Newskin in 1.24 seconds
Jan 7 22:00:29 raspberrypi weewx[685]: imagegenerator: Generated 30 images for Newskin in 5.92 seconds
Jan 7 22:00:29 raspberrypi weewx[685]: copygenerator: copied 0 files to /var/www/html
Jan 7 22:00:40 raspberrypi weewx[685]: cheetahgenerator: Generated 4 files for report Highcharts_Belchertown in 10.28 seconds
Jan 7 22:00:40 raspberrypi weewx[685]: copygenerator: copied 0 files to /var/www/html/belchertown
Jan 7 22:00:41 raspberrypi weewx[685]: cheetahgenerator: Generated 13 files for report Belchertown in 1.53 seconds
Jan 7 22:00:41 raspberrypi weewx[685]: copygenerator: copied 1 files to /var/www/html/belchertown
Jan 7 22:00:57 raspberrypi weewx[685]: ftpgenerator: ftp'd 75 files in 15.72 seconds
YES !!!!!!!!!!!!!!!!!!!!!!
So add de back in locales but make en_US.UTF-8 the default that way German characters will still be allowed.
great
Jan 7 22:09:28 raspberrypi weewx[799]: manager: Added record 2019-01-07 22:09:00 CET (1546895340) to database 'weewx.sdb'
Jan 7 22:09:28 raspberrypi weewx[799]: manager: Added record 2019-01-07 22:09:00 CET (1546895340) to daily summary in 'weewx.sdb'
Jan 7 22:09:55 raspberrypi weewx[799]: cheetahgenerator: Generated 25 files for report Newskin in 13.27 seconds
Jan 7 22:10:15 raspberrypi weewx[799]: imagegenerator: Generated 61 images for Newskin in 20.44 seconds
Jan 7 22:10:15 raspberrypi weewx[799]: copygenerator: copied 3 files to /var/www/html
Jan 7 22:10:26 raspberrypi weewx[799]: cheetahgenerator: Generated 4 files for report Highcharts_Belchertown in 11.27 seconds
Jan 7 22:10:26 raspberrypi weewx[799]: copygenerator: copied 0 files to /var/www/html/belchertown
Jan 7 22:10:27 raspberrypi weewx[799]: Belchertown Extension: version 0.8.2
Jan 7 22:10:47 raspberrypi weewx[799]: cheetahgenerator: Generated 26 files for report Belchertown in 20.32 seconds
Jan 7 22:10:47 raspberrypi weewx[799]: copygenerator: copied 22 files to /var/www/html/belchertown
Jan 7 22:11:26 raspberrypi weewx[799]: ftpgenerator: ftp'd 229 files in 39.59 seconds
missing graphic elements
you root ulr isn't set correctly
<a href="http://your_full_website_url/">
[[[Extras]]]
belchertown_root_url = http://scharfeseckgleitschirm.club/belchertown/
make sure you edit the EXTRAS settings under [[Belchertown]]
yes
thanks its late here I will look tomorow
Make sure to update all skins settings in weewx.conf.
See the readme on this repo on how.
When I release 0.8.3 it will delete your skin.conf
Which means your customization in skin.conf will be deleted.
Thanks to Pat O'Brien and Scott Grayban I will close it
Hello I allways get this error!What value its wrong, I try with other versions too