ebrithiljonas / fittrackee-uploader

A companion application for FitTrackee to upload your workout files
GNU Affero General Public License v3.0
14 stars 4 forks source link

No 'sports' attribute, crash #3

Closed dkm closed 5 months ago

dkm commented 1 year ago

Fresh install, gives:

Traceback (most recent call last):
  File "/.../fittrackee-uploader/fittrackee-uploader/uploader.py", line 160, in upload
    sport_id = self.getSportID(self.ui.cbSportType.currentText())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.../git/fittrackee-uploader/fittrackee-uploader/uploader.py", line 151, in getSportID
    if len(self.sports) > 0:
           ^^^^^^^^^^^
AttributeError: 'Uploader' object has no attribute 'sports'
[1]    1927196 IOT instruction  python fittrackee-uploader

On the FIT files I'm trying to upload. Not really sure what's wrong...

If the app was a cli, I would have been able to debug, but I'm mostly clueless in front of a GUI... Any way we could use your app from cli?

dkm commented 1 year ago

Oh, and the drop-down on the left (for the activity) is empty.

ebrithiljonas commented 1 year ago

I would need some more information so I can debug this, at the moment it looks to me that the tool can't download the list of sports available on your server but this is just a guess. So could you tell me what version of fittrackee your running and on what OS you run the uploader? And also maybe give me a sample fit-file where the issue happens.

And in terms of cli usage, for me it makes no sense to implement a cli mode since you can't visualize the track and therefore decide what the track was.

dkm commented 1 year ago

After more investigation, it's probably that the FIT my device produces don't have the exact same layout as yours.... Which also explain your last point: my device embeds the activity name in the FIT file. I've hacked a small cli tools that takes the FIT file, finds the activity name, maps it to the server's list, convert to GPX, uploads the track. I can provide you with a FIT file if you want to fix the crash.