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

TypeError: build() takes 2 positional arguments but 3 were given #201

Closed
kofec opened this issue Feb 2, 2018 · 3 comments
Closed

TypeError: build() takes 2 positional arguments but 3 were given #201

kofec opened this issue Feb 2, 2018 · 3 comments

Comments

@kofec
Copy link

kofec commented Feb 2, 2018

import miio.airpurifier
MyAir = miio.airpurifier.AirPurifier(args.IPaddress, args.token)

Traceback (most recent call last):
  File "./MyAir.py", line 64, in <module>
    print(MyAir.status()) - 
  File "/usr/local/lib/python3.5/dist-packages/miio/airpurifier.py", line 215, in status
    properties[0:13]
  File "/usr/local/lib/python3.5/dist-packages/miio/device.py", line 216, in send
    m = Message.build(msg, ctx)
TypeError: build() takes 2 positional arguments but 3 were given
@syssi
Copy link
Collaborator

syssi commented Feb 2, 2018

It's already fixed (master) and will be part of the next release.

@aebgit
Copy link

aebgit commented Feb 2, 2018

inbetween you can just replace the content of your usr/local/lib/python3.5/dist-packages/miio/device.py with this one https://raw.githubusercontent.com/rytilahti/python-miio/17c7a26602b4d11d6a2563ba19eade4b73c7608a/miio/device.py

@rytilahti
Copy link
Owner

Closing as already fixed.

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

4 participants