ChristianKuehnel/plantgateway

__init__() takes 2 positional arguments but 3 were given

Opened this issue · 3 comments

szogi commented

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

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

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

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: basnijholt/miflora#133