sixfab / Sixfab_RPi_3G-4G-LTE_Base_Shield

It is repository of quickstart instructions for Sixfab Raspberry Pi 3G/4G/LTE Base Shield
MIT License
33 stars 34 forks source link

Getting File "gpstest.py", line 8 print "raw:", data #prints raw data #5

Open paulnewnes opened 3 years ago

paulnewnes commented 3 years ago

in addition - SyntaxError: Missing parentheses in call to 'print'. Did you mean print("raw:", data #prints raw data)?

when running: sudo python3 gpstest.py

the original recommendation is from here: https://community.sixfab.com/t/how-to-get-gps-data/178/2

and the command is sudo python3 gpstest.py .

Is this a python3 issue?

jclarijs commented 3 years ago

Just passing by, but the script you are running is written in python2 syntax. Python 3 is not backwards compatible with python 2. Therefore you can't use python3 to run gpstest.py.

You could convert the gpstest.py to a python3 script manually (it's not a big script), or you could use python's converter program: https://docs.python.org/2/library/2to3.html

Otherwise you could use python2 to run the script.

paulnewnes commented 3 years ago

thanks @jclarijs .