ChristianKuehnel / plantgateway

Bluetooth to mqtt gateway for Xiaomi Mi plant sensors
Apache License 2.0
271 stars 43 forks source link

__init__() takes 2 positional arguments but 3 were given #40

Open szogi opened 4 years ago

szogi commented 4 years ago

Wed, 09 Oct 2019 11:22:21 INFO PlantGateway version 0.6.2 Wed, 09 Oct 2019 11:22:21 INFO loaded config file from /root/.plantgw.yaml Wed, 09 Oct 2019 11:22:21 INFO Getting data from sensor myplant Wed, 09 Oct 2019 11:22:21 ERROR could not read data from 11:22:33:44:55:66 (myplant) with reason: init() takes 2 positional arguments but 3 were given Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/plantgw/plantgw.py", line 263, in process_all self.process_mac(sensor) File "/usr/local/lib/python3.7/dist-packages/plantgw/plantgw.py", line 239, in process_mac poller = MiFloraPoller(sensor_config.mac, BluepyBackend) File "/usr/local/lib/python3.7/dist-packages/miflora/miflora_poller.py", line 37, in init self._bt_interface = BluetoothInterface(backend, adapter) TypeError: init() takes 2 positional arguments but 3 were given could not read data from 11:22:33:44:55:66 (myplant) with reason: init() takes 2 positional arguments but 3 were given

szogi commented 4 years ago

bluepy-1.3.0 btlewrap-0.0.7 miflora-0.5 paho-mqtt-1.4.0 plantgateway-0.6.2 pyyaml-5.1.2 typing-3.7.4.1

Python 3.7.3

gonecrazy25 commented 4 years ago

I am having this exact same problem.

could not read data from C4:7C:8D:63:CA:79 (front-door-plant) with reason: init() takes 2 positional arguments but 3 were given

bluepy (1.3.0), btlewrap (0.0.7), miflora (0.5), paho-mqtt (1.4.0), plantgateway (0.6.2), PyYAML (5.1.2), typing (3.7.4.1) Python 3.6.8

ChristianKuehnel commented 4 years ago

Sorry too fast. Please DOWNGRADE to version 0.0.4

pip remove btlewrap
pip install btlewrap==0.0.4

The proper fix is implemented and waiting for a release: https://github.com/open-homeautomation/miflora/pull/133