Tigge / antfs-cli

Extracts FIT files from ANT-FS based sport watches such as Garmin Forerunner 60, 405CX, 310XT, 610 and 910XT.
MIT License
311 stars 76 forks source link

SyntaxError: invalid syntax @ line 96 #62

Closed zagid closed 11 years ago

zagid commented 11 years ago

When I run garmin.py I get the following message:

File "garmin.py", line 96 print "Searching..." ^ SyntaxError: invalid syntax

christofferholmstedt commented 11 years ago

Do you have the entire printout or the log from that?

I've noticed that simply running "garmin.py" with the wrong privileges can give quite strange errors, not related at all.

zagid commented 11 years ago

This is the entire output I get on the terminal. I hope I am answering the question, still new to Linux, if there is a way how to get more info pls let me know.

christofferholmstedt commented 11 years ago

Which distribution are you using? Ubuntu?

zagid commented 11 years ago

ArchLinux with Gnome, last update today

trtg commented 11 years ago

Are you using python3? Without any context that looks like an error related to the new print() syntax.

On Fri, May 24, 2013 at 10:52 AM, zagid notifications@github.com wrote:

When I run garmin.py I get the following message:

File "garmin.py", line 96 print "Searching..." ^ SyntaxError: invalid syntax

— Reply to this email directly or view it on GitHubhttps://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/62 .

zagid commented 11 years ago

I think so: "pacman -Q python" gives "python 3.3.1-1" Is the code made for python3 or do I have to make any changes? I am only vaguely aware of the changes between version of python.

Tigge commented 11 years ago

It's made for python 2.7, not sure how much effort it would be to make it run on python 3. I think most distributions still uses python 2, but have packages so both python 2 and 3 can be installed at the same time.

You could try running the code through http://docs.python.org/2/library/2to3.html. I don't know if that alone would make it work though.

zagid commented 11 years ago

I ran it through 2to3 and some progress achieved. Now, upon "python garmin.py" I get this:

Request basic information... ANT version: b'AJK1.04RAF' Capabilities: array('B', [8, 3, 0, 186, 54, 0]) Serial number: 3311854 Starting system... Searching... Authenticating with Forerunner 910XT (3860148530)

zagid commented 11 years ago

Between "in" and "ignored" in the last line there should also be this:

bound method _Initializer.del of <usb.backend.libusb1._Initializer object at 0x7f61f856de10

Tigge commented 11 years ago

That is quite fat actually. No idea what is causing this though. I think I'd recommend using the python2 package instead.

zagid commented 11 years ago

Degraded to python2 and all is working fine, so issue closed.
Just a small note, the .fit files went to /root/.config/garmin-extractor/ so it took me a while to find & copy them.

Thanks for the software and for the support, this sort of thing is that made me switch to linux.

Tigge commented 11 years ago

Yeah, I've tried to specify this in the README file but I guess reporting it through the command line tool would be quite good as well. I'll look into it.