jrester/tesla_powerwall

Running on Raspberry Pi;

omaliphant opened this issue · 9 comments

Hi,
Am using python on a raspberry pi to pull data from my powerwall and send it to my Crestron system.
I have an issue when running my script that errors on the init.py file.

Line 48; self.endpoint = f”https://{endpoint}”
Syntax error: invalid syntax

Have you seen this before?
The Pi 3b+ is running Raspbian 9.4
Python is 3.5.3
Works great on my dev env in windows 10 / VS Code.
Many thanks

Hey, python 3.5 does not support f'strings. Can you switch to a newer python version? Otherwise I can implement a fix to make it compatible with older python versions.

I will update to 3.7.4 and try again. Thanks for the quick reply!

Might be worth adding a note to the read me as I didn’t see a minimum python version in there?

it seems Raspbian Strech doesnt support greater than 3.5... and i cant go to Buster as its got compatibility issues with the bluetooth integration that i am using on another app...
any advice?

You could Install python fromm a different source but this isn't a good solution. I will try to make it more backwards compatible. I think I will publish a fix tomorrow.
Yes, a Note would be a good idea😃

Thank you so much!

I pushed a fix to master. Could you verify it works by cloning the repo and trying on your raspberry pi? Then I can publish a new version to PyPi.

testing now... thanks!

was also missing the pip "packaging" dependancy, added it with "pip3 install packaging" and now it works great! thank you so much!
Now to fix my poor python code! lol!

Oh, ups. Seems Like I forgot to add it to the requirements.txt😬