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

battery value sometimes are not returned #28

Closed
ntnxcrex opened this issue Apr 19, 2019 · 1 comment
Closed

battery value sometimes are not returned #28

ntnxcrex opened this issue Apr 19, 2019 · 1 comment

Comments

@ntnxcrex
Copy link

copied battey python script, sometimes it return no values with error:
running on raspberry. Awesome work indeed!!!

pi@raspberrypi:~ $ python battery.py
WARNING: No module named pexpect
Voltage: 0.69384765625
Voltage: 0.694091796875
Voltage: 0.69384765625
Voltage: 0.694091796875
Traceback (most recent call last):
File "battery.py", line 10, in
print ("Value: " % hub.voltage.last_value)
TypeError: not all arguments converted during string formatting
pi@raspberrypi:~ $ python battery.py
WARNING: No module named pexpect
Traceback (most recent call last):
File "battery.py", line 10, in
print ("Value: " % hub.voltage.last_value)
TypeError: not all arguments converted during string formatting

@undera
Copy link
Owner

undera commented Apr 19, 2019

That line misses proper formatting. Right statement is print ("Value: %s" % hub.voltage.last_value)

@undera undera closed this as completed Dec 26, 2019
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

2 participants