-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Labels
Description
I am trying to use pytg with Python v3.2.3 on a Raspberry Pi (latest model, latest Raspbian), but I'm getting multiple SyntaxError: invalid syntax
. Am I missing something really obvious? If your project is compatible with python3, then why is it complaining about python2.7-style lines of code?
The telegram-cli is installed and works great, just typing commands via its command line. For using it with pytg, I am running it as specified in your documentation: bin/telegram-cli --json -P 4458
What works:
- After git clone for pytg, running
python setup.py install
works fine - Running
python pytg/examples/ping.py
works great (Python 2.7.3)
What does not:
- After git clone for pytg, running
python3 setup.py install
shows
Traceback (most recent call last):
File "setup.py", line 8, in <module>
from pytg import VERSION
File "/home/pi/pytg/pytg/__init__.py", line 9, in <module>
from .encoding import to_unicode as u
File "/home/pi/pytg/pytg/encoding.py", line 36
return u"\\"
^
SyntaxError: invalid syntax
- Running
python3 pytg/examples/ping.py
shows
File "pytg/examples/ping.py", line 57
if msg.text == u"ping":
^
SyntaxError: invalid syntax