how getting work Highcharts on weewx 4.1?

216 views
Skip to first unread message

Astrid

unread,
Sep 9, 2020, 12:23:26 PM9/9/20
to weewx-user
Hello!

I updated my Leap 15.1 to 15.2 and afterwards
I updated my old weewx 3.9 to weewx 4.1.

weewx 4.1 itself is running and recocnizes via
fileparser my weatherdata.

But wee_reports is not running:

wee_reports
Using configuration file /etc/weewx/weewx.conf
Generating for all time
Traceback (most recent call last):
  File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
    obj.start()
  File "/usr/share/weewx/weewx/reportengine.py", line 280, in start
    self.run()
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 147, in run
    self.initExtensions(gen_dict[section_name])
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 189, in initExtensions
    class_ = weeutil.weeutil.get_object(x)
  File "/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
    mod = __import__(module)
  File "/usr/share/weewx/user/highchartsSearchX.py", line 73
    except Exception, e:
                    ^
SyntaxError: invalid syntax

I copy again from https://github.com/gjr80/weewx-highcharts/tree/master/bin/user
both py-files to my local
/usr/share/weewx/user

But same error-message. :(

How I can get it run with weewx 4.1?

Regards, Astrid

Tom Keffer

unread,
Sep 9, 2020, 12:29:44 PM9/9/20
to weewx-user
It looks like the Highcharts extension you are using has not been ported to Python 3. Either use Python 2, or beg the author to port it. :-)

--
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/48e92fed-a8c9-46a4-aa61-835c378b50ebo%40googlegroups.com.

Astrid

unread,
Sep 9, 2020, 12:36:15 PM9/9/20
to weewx-user
Hello!

Ok, thanx.
:(

I myself do not know python, for taking a look
myself to the source. :(

@gjr80 can you perhaps take a look?

I think because end of life of python 2.7 is reached, it
is better, to use python 3.

I would be very pitty, if such a great extension as
the Highcharts for weewx will not longer work with
woth python 3.

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

Astrid

unread,
Sep 9, 2020, 1:07:05 PM9/9/20
to weewx-user
Hello!

I tried to convert it automatically with 2to3, but it gives errors then too
during running wee_reports. :(

Regards, Astrid

Astrid

unread,
Sep 11, 2020, 7:00:44 AM9/11/20
to weewx-user
Hello!

Thanx to gjr80 for the new version.
I take both .py files from your python3-git, but
still not working:


wee_reports
Using configuration file /etc/weewx/weewx.conf
Generating for all time
Traceback (most recent call last):
  File "/usr/share/weewx/weeutil/weeutil.py", line 1098, in get_object
    mod = getattr(mod, part)
AttributeError: module 'user.highchartsSearchX' has no attribute 'highchartsMinRanges'

During handling of the above exception, another exception occurred:


Traceback (most recent call last):
  File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
    obj.start()
  File "/usr/share/weewx/weewx/reportengine.py", line 280, in start
    self.run()
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 147, in run
    self.initExtensions(gen_dict[section_name])
  File "/usr/share/weewx/weewx/cheetahgenerator.py", line 189, in initExtensions
    class_ = weeutil.weeutil.get_object(x)
  File "/usr/share/weewx/weeutil/weeutil.py", line 1102, in get_object
    "Module '%s' has no attribute '%s' when searching for '%s'" % (mod.__name__, part, module_class))
AttributeError: Module 'user.highchartsSearchX' has no attribute 'highchartsMinRanges' when searching for 'user.highchartsSearchX.highchartsMinRanges'

Regards, Astrid

gjr80

unread,
Sep 11, 2020, 7:56:46 AM9/11/20
to weewx-user
It’s a work in progress so you pull from a branch at your own peril. I will put a release on GitHub and post here when I have a working version I am happy with.

Gary

Astrid

unread,
Sep 11, 2020, 11:44:40 AM9/11/20
to weewx-user
Hello!

Ok, thanx.
I thought, it has been finished, sorry.

Regards, Astrid

gjr80

unread,
Sep 19, 2020, 10:07:40 PM9/19/20
to weewx-user
I have released v0.3.0 of the Highcharts for WeeWX extension on GitHub. v0.3.0 is python2/python3 compatible and will run under WeeWX 3.4.0 and later.

Gary

Astrid

unread,
Sep 21, 2020, 8:25:07 AM9/21/20
to weewx-user
Hello!

Thank you very much. :)

Now your very great Highcharts are working. :)

Regards, Astrid
Reply all
Reply to author
Forward
0 new messages