Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error processing .fit file #106

Closed
zoenglinghou opened this issue Apr 14, 2024 · 3 comments · Fixed by #108
Closed

Error processing .fit file #106

zoenglinghou opened this issue Apr 14, 2024 · 3 comments · Fixed by #108

Comments

@zoenglinghou
Copy link

Hi, thank you for developing this project! I am trying out the project with podman on my local machine, and there seems to be an error processing a .fit file generated using a Wahoo Element Bolt bike computer.

version: v0.13.0
The following error is seen on the page:
image

The console log follows:

{"time":"2024-04-14T19:25:40.367276288Z","level":"ERROR","msg":"sql: converting argument $5 type: json: unsupported value: NaN","app":"workout-tracker","version":"master","sha":"1131e68d8a262f85731b2a661f5a6af1897aa8af","module":"database","error":"sql: converting argument $5 type: json: unsupported value: NaN","query":"INSERT INTO `map_data_details` (`created_at`,`updated_at`,`deleted_at`,`map_data_id`,`points`) VALUES (\"2024-04-14 19:25:40.366\",\"2024-04-14 19:25:40.366\",NULL,1,\"\") ON CONFLICT (`id`) DO UPDATE SET `map_data_id`=`excluded`.`map_data_id` RETURNING `id`","duration":117335,"rows":0,"file":"/app/pkg/database/workouts.go:197"}
{"time":"2024-04-14T19:25:40.367474547Z","level":"ERROR","msg":"sql: converting argument $5 type: json: unsupported value: NaN","app":"workout-tracker","version":"master","sha":"1131e68d8a262f85731b2a661f5a6af1897aa8af","module":"database","error":"sql: converting argument $5 type: json: unsupported value: NaN","query":"INSERT INTO `map_data` (`created_at`,`updated_at`,`deleted_at`,`workout_id`,`creator`,`name`,`center`,`address`,`total_distance`,`total_duration`,`max_speed`,`pause_duration`,`min_elevation`,`max_elevation`,`total_up`,`total_down`,`points`) VALUES (\"2024-04-14 19:25:40.366\",\"2024-04-14 19:25:40.366\",NULL,1,\"Garmin Connect\",\"\",\"{\"\"Lat\"\":47.45598521556553,\"\"Lng\"\":8.797513872274084}\",\"{\"\"FormattedAddress\"\":\"\"Burgstrasse, Rutzen, Rikon, Zell (ZH), Bezirk Winterthur, Zürich, 8486, Schweiz/Suisse/Svizzera/Svizra\"\",\"\"Street\"\":\"\"Burgstrasse\"\",\"\"HouseNumber\"\":\"\"\"\",\"\"Suburb\"\":\"\"\"\",\"\"Postcode\"\":\"\"8486\"\",\"\"State\"\":\"\"Zürich\"\",\"\"StateCode\"\":\"\"\"\",\"\"StateDistrict\"\":\"\"\"\",\"\"County\"\":\"\"\"\",\"\"Country\"\":\"\"Schweiz/Suisse/Svizzera/Svizra\"\",\"\"CountryCode\"\":\"\"CH\"\",\"\"City\"\":\"\"Rikon\"\"}\",0,6524000000000,0,776000000776,0,0,355.1200000000007,0,NULL) ON CONFLICT (`id`) DO UPDATE SET `workout_id`=`excluded`.`workout_id` RETURNING `id`","duration":1315417,"rows":1,"file":"/app/pkg/database/workouts.go:197"}
{"time":"2024-04-14T19:25:40.368148467Z","level":"ERROR","msg":"sql: converting argument $5 type: json: unsupported value: NaN; sql: converting argument $5 type: json: unsupported value: NaN","app":"workout-tracker","version":"master","sha":"1131e68d8a262f85731b2a661f5a6af1897aa8af","module":"database","error":"sql: converting argument $5 type: json: unsupported value: NaN; sql: converting argument $5 type: json: unsupported value: NaN","query":"INSERT INTO `workouts` (`created_at`,`updated_at`,`deleted_at`,`name`,`date`,`user_id`,`dirty`,`notes`,`type`,`data`,`gpx_data`,`filename`) VALUES (\"2024-04-14 19:25:40.364\",\"2024-04-14 19:25:40.364\",NULL,\"\",\"2024-04-12 14:21:29\",1,false,\"\",\"cycling\",NULL,\"\",\"\") RETURNING `id`,`checksum`","duration":5123591,"rows":1,"file":"/app/pkg/database/workouts.go:197"}

I would happily provide you with the file privately via Email if you decide to tackle the issue, since I don't want to reveal my location. Thanks!

@jovandeginste
Copy link
Owner

You can send the file to my mail address, associated with my commits on github

jovandeginste added a commit that referenced this issue Apr 15, 2024
With more samples, we can improve the import logic.

Fixes #106

Signed-off-by: Jo Vandeginste <Jo.Vandeginste@kuleuven.be>
@jovandeginste
Copy link
Owner

@zoenglinghou thanks for the sample - I fixed the logic and can import your samples successfully now; please try for yourself and report back if anything is still missing...

@zoenglinghou
Copy link
Author

it works as intended. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants