moderation/garmin-connect-export

activities without 'distance'

whitas opened this issue · 3 comments

I have tested code from "activity search url " branch. It worked OK, as we talking about HTTP Errors.
But there is a problem connected with activities without 'distance' - as Yoga, or Aerobic

Traceback (most recent call last):
  File "/Users/tomek/Garmin/garmin-connect-export//gcexport.py", line 463, in <module>
    print "{0:.3f}".format(a['distance']/1000)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

This looks like your running code from @pe-st fork at https://github.com/pe-st/garmin-connect-export/blob/feature/activity-search-url/gcexport.py and not code from this fork / repo. I'd be interested to see what happens using gcexport3.py.

There is another issue I've send. Regarding utf-8 decoding

pe-st commented

Hello @whitas, on my develop branch I have merged a pull request that should fix this: pe-st/garmin-connect-export#3. Maybe you could give it a try (the gcexport.py, the fix is only in the 'old' Python 2 variant) ?