Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on startup with the updated version #6

Closed
steepleian opened this issue May 10, 2020 · 3 comments
Closed

Error on startup with the updated version #6

steepleian opened this issue May 10, 2020 · 3 comments

Comments

@steepleian
Copy link

Hi,
Firstly, thanks for this extension. I am attempting to set it up to use the SDS011 particle sensor in conjunction with the weewx-sds011 driver.

Does this version have backward compatibility or is it purely Python3x? The reason I ask is that it is throwing the following error at startup: -

sudo tail -f /var/log/syslog
May 10 09:25:29 raspberrypi weewx[15155]: **** self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
May 10 09:25:29 raspberrypi weewx[15155]: **** File "/home/weewx/bin/weeutil/weeutil.py", line 1107, in _get_object
May 10 09:25:29 raspberrypi weewx[15155]: **** mod = import(module)
May 10 09:25:29 raspberrypi weewx[15155]: **** File "/home/weewx/bin/user/aqi/service.py", line 15, in
May 10 09:25:29 raspberrypi weewx[15155]: **** from . import calculators
May 10 09:25:29 raspberrypi weewx[15155]: **** File "/home/weewx/bin/user/aqi/calculators.py", line 80
May 10 09:25:29 raspberrypi weewx[15155]: **** class AqiCalculator(metaclass=ABCMeta):
May 10 09:25:29 raspberrypi weewx[15155]: **** ^
May 10 09:25:29 raspberrypi weewx[15155]: **** SyntaxError: invalid syntax
May 10 09:25:29 raspberrypi weewx[15155]: **** Exiting.

@jonathankoren
Copy link
Owner

I ran 2to3 on the code and changed litre to liter because the spelling changed between WeeWX 3.x and 4.x. So it's Python 3.

Try this release for python2 support:
https://github.com/jonathankoren/weewx-aqi/releases/tag/v1.1.3

@steepleian
Copy link
Author

steepleian commented May 12, 2020

Thanks Jonathan,
I picked up the spelling difference last night and pleased to report that it cleared the error.
A question. I am using the UK DAQI. I notice that the category columns are all populated in the aqi.sdb database with zero. Is this correct? I am still getting a background colour but as the readings are at index 1 at the moment have yet to see if this will change when index increases. Am I correct in thinking the category is linked to colour or is it different for DAQI.
Thanks
Ian

@steepleian
Copy link
Author

To save confusion I will move the database discussion to a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants