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

aqi has no attribute to_iaqi #16

Open
pierrot10 opened this issue Apr 19, 2020 · 1 comment
Open

aqi has no attribute to_iaqi #16

pierrot10 opened this issue Apr 19, 2020 · 1 comment

Comments

@pierrot10
Copy link

Dear Sir or Madam,
I am new about AQI measurement. I found a tutorial and I configure a Raspberry Zero W with Raspbian. I could successfully install the SDS011 library and I also installed. I am using Python3

sudo pip3 install python-aqi

(I also tried with pip install python-aqi)
I did see any errors. However, when I call the function

def conv_aqi(pmt_2_5, pmt_10):
    aqi_2_5 = aqi.to_iaqi(aqi.POLLUTANT_PM25, str(pmt_2_5))
    aqi_10 = aqi.to_iaqi(aqi.POLLUTANT_PM10, str(pmt_10))
    return aqi_2_5, aqi_10

I got that error

AttributeError: module 'aqi' has no attribute 'to_iaqi'

Any reason of this error? Did I missed a step?
Many thank for your help

@hfrusinque
Copy link

Dear Pierrot,

I'm also using the Nova sensors (SDS011) and had the same problem. There seems to be an issue with the pip installation. However, you can download the code directly to a zip file, and place your code into the master folder. Running the code directly in the master folder "fixed" the problem.

Best regards,
Hector

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