Erors after installing Highcharts

120 views
Skip to first unread message

James Fritz

unread,
Oct 13, 2020, 11:47:30 PM10/13/20
to weewx-user
``Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****  '>' not supported between instances of 'NoneType' and 'float'
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      obj.start()
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 280, in start
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      self.run()
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 150, in run
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      ngen = self.generate(gen_dict[section_name], self.gen_ts)
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 220, in generate
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], gen_ts)
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 220, in generate
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], gen_ts)
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 309, in generate
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      default_binding)
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 376, in _getSearchList
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      searchList += obj.get_extension_list(timespan, db_lookup)
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/highchartssearchlist.py", line 1243, in get_extension_list
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      period)
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/highchartssearchlist.py", line 961, in calc_windrose
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****      max_speed = max(speed_vec_vt.value)
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****  TypeError: '>' not supported between instances of 'NoneType' and 'float'
Oct 13 22:45:23 raspberryWeather weewx[20059] ERROR weewx.reportengine:         ****  Generator terminated```

gjr80

unread,
Oct 14, 2020, 6:40:26 AM10/14/20
to weewx-user
The stack trace provided indicates that you have one or more archive records where windSpeed is None, which in turn suggests that during the corresponding archive periods you did not receive any loop packets containing windSpeed data. Whilst unusual this is not unheard of and the highcharts extension should be able to handle such situations. I will need to make some modification to the extension, on first glance it looks straightforward so hopefully I will release a fix in a day or so, if it's more complex it might take longer. Will post back here.

Gary

James Fritz

unread,
Oct 14, 2020, 9:11:09 AM10/14/20
to weewx-user
I had wind pretty much all night with some gust and still getting the error.  Also, I am not understanding 100% how this extension works. I have installed the Stacked Windrose also, it is putting the .png file in the /var/www/html/weewx folder, but when I open my local index.html in Chromium, it does not appear.  Can only view when I click on picture.  Are the Highcharts and windrose supposed to be incorporated into the html file?

Thanks!

gjr80

unread,
Oct 14, 2020, 9:36:26 AM10/14/20
to weewx-user
On Wednesday, 14 October 2020 at 23:11:09 UTC+10 frit...@gmail.com wrote:
I had wind pretty much all night with some gust and still getting the error. 

By default the extension produces wind rose data over 24 hours, 7 days, a month and a year. Without going into details just one archive period without windSpeed data in the previous 24 hours will cause the error.

Also, I am not understanding 100% how this extension works.

Not sure what you mean by this. The extension generates a suite of JSON formatted data that can be used by Highcharts to plot various WeeWX data. There are three elements to the extension; the reports that generate the JSON data, example JavaScript files to use with Highcharts to render the plots and example HTML to display the plots on a page served by a web server. If you want to display the plots on your own page (WeeWX generated or otherwise) then you need to integrate those three elements in your own site/pages.

I have installed the Stacked Windrose also, it is putting the .png file in the /var/www/html/weewx folder, but when I open my local index.html in Chromium, it does not appear.  Can only view when I click on picture. 

The stacked windrose generator generates a graphic file for inclusion on a web page of your choice, it is up to you to add the appropriate HTML tags to display the image on your page/site.
 
Are the Highcharts and windrose supposed to be incorporated into the html file?

Probably covered above, but ultimately if you want to display the Highcharts plots and stacked windrose you need to integrate them into your pages yourself, they are not integrated into any WeeWX generated pages like the WeeWX plot image files are. 

Gary

James Fritz

unread,
Oct 14, 2020, 9:50:26 AM10/14/20
to weewx-user
Thanks for the quick reply.  You answered what I needed to know.  I need to integrate them into my page, that is where I was lost.  I just assumed it did it automatically.  
I will watch the highcharts for a few days to see if error persist then.

gjr80

unread,
Oct 15, 2020, 7:17:39 PM10/15/20
to weewx-user
I believe I have fixed the problem. Could you try using the latest highchartsearchlist.py, to install:

1. move aside you existing highchartssearchlist.py:

$ sudo mv /usr/share/weewx/user/highchartssearchlist.py /usr/share/weewx/user/highchartssearchlist_orig.py

2. download the latest highchartssearchlist.py in its place:


3. restart WeeWX.

Monitor your WeeWX log to see if the original error recurs. Please let me know how you get on and if the issue is fixed I will release v0.3.1.

Gary

James Fritz

unread,
Oct 16, 2020, 10:30:43 AM10/16/20
to weewx-user
Do not see the errors anymore, thanks!

``INFO weewx.cheetahgenerator: Generated 1 files for report Highcharts in 0.76 seconds
```

Reply all
Reply to author
Forward
0 new messages