BnMcG / PyRobovac

Python library for controlling the Eufy RoboVac 11c
Apache License 2.0
27 stars 2 forks source link

probably rookie error #2

Closed lordbeniel closed 5 years ago

lordbeniel commented 5 years ago

I'm sure I'm missing something incredibly obvious as I'm a novice here but what am I doing wrong?

after running

sudo pip install robovac==0.0.7

to install the software. and creating a simple script:

#!/usr/bin/env python
from robovac.robovac import Robovac

my_robovac = Robovac('192.168.1.3', 'FFFFFFFFFFFFFFFF')

# Get RoboVac status
my_robovac.get_status()

When I run

python3.5 ./PyRobovac/robovac/try1.py I get the error

Traceback (most recent call last):
  File "./PyRobovac/robovac/try1.py", line 4, in <module>
    from robovac.robovac import Robovac

  File "/home/user/PyRobovac/robovac/robovac.py", line 129
    return f'[FIND_ME: {self.find_me}, WATER_TANK: {self.water_tank_status}, MODE: {self.mode}, SPEED: {self.speed}, CHARGER_STATUS: {self.charger_status}, BATTERY_CAPACITY: {self.battery_capacity}, ERROR_CODE: {self.error_code}, STOP: {self.stop}]'
BnMcG commented 5 years ago

Try

from robovac import Robovac
my_robovac = Robovac('192.168.1.3', 'FFFFFFFFFFFFFFFF')

# Get RoboVac status
my_robovac.get_status()

I think the README may have the import path wrong, sorry!

lordbeniel commented 5 years ago

that helped! thank you. I also switched from python 3.5 to 3.6 it seems that 3.5 doesnt have f-String formatting.

its working now. thank you for this, I'd been trying to work out the protobuf for ages with no success.

BnMcG commented 5 years ago

Ah, that's also true! I'll update the README with the correct import path and list Python 3.6 as a minimum requirement. Thanks for reporting!