errors in Python 2 and Python 3
Closed this issue · 2 comments
ping13 commented
orginal source: personal email
I trying to use heospy but I bump in to same error all the time.
I running heospy on a raspberry pi 3 and I have tried both python 2 and 3.
I have created a heos account and configured the config.json file.
##
python2 heos_player.py
Traceback (most recent call last):
File "heos_player.py", line 18, in <module>
import ssdp # Simple Service Discovery Protocol (SSDP), https://gist.github.com/dankrause/6000248
File "/home/pi/scripts/heospy/ssdp.py", line 18, in <module>
import http.client
ImportError: No module named http.client
##
python3 heos_player.py
File "heos_player.py", line 312
print json.dumps(all_results, indent=2)
^
SyntaxError: invalid syntax
ping13 commented
first notes, while not on my dev machine:
- not sure about the python2 error. Check if you really use Python 2.7 and not an earlier version
- Th python3 issue is a bug: replace the line with additional brackets
print(json.dumps(all_results, indent=2))
I will push a new commit eventually.