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: Failed to convert Strength/Stretching Workouts #138

Closed
bombbr opened this issue Jul 13, 2021 · 7 comments
Closed

Error: Failed to convert Strength/Stretching Workouts #138

bombbr opened this issue Jul 13, 2021 · 7 comments
Assignees
Labels

Comments

@bombbr
Copy link

bombbr commented Jul 13, 2021

Describe the bug
Was having an issue with the 404 error that was just fixed (#136) but now the following error occurs when running program:

I've replaced the workout id with WORKOUTID and my username

[18:47:20 ERR] Failed to convert workout data WORKOUTID_30_min_Focus_Flow-_Hamstrings_with_Ross_Rayburn ./working/downloaded/WORKOUTID_30_min_Focus_Flow-_Hamstrings_with_Ross_Rayburn.json
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable1.get_Value() at Conversion.FitConverter.GetSessionMesg(Workout workout, WorkoutSamples workoutSamples, DateTime startTime, DateTime endTime, UInt16 numLaps) in /Users/xxx/peloton-to-garmin/src/Conversion/FitConverter.cs:line 424 at Conversion.FitConverter.Convert(Workout workout, WorkoutSamples workoutSamples) in /Users/xxx/peloton-to-garmin/src/Conversion/FitConverter.cs:line 150 at Conversion.Converter1.Convert(String format) in /Users/xxx/peloton-to-garmin/src/Conversion/IConverter.cs:line 94

Installation (please complete the following information):

  • OS: mac
  • Method: source
  • Version: 2.0.3
@bombbr bombbr added the bug label Jul 13, 2021
@Novelus23
Copy link

I am getting the same item with a strength workout, cycling appears fine: [22:12:39 ERR] Failed to convert workout data cccc_20_min_Upper_Body_Strength_with_Adrian_Williams ./working\downloaded\cccc_20_min_Upper_Body_Strength_with_Adrian_Williams.json
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable1.get_Value() at Conversion.FitConverter.GetSessionMesg(Workout workout, WorkoutSamples workoutSamples, DateTime startTime, DateTime endTime, UInt16 numLaps) in D:\a\peloton-to-garmin\peloton-to-garmin\src\Conversion\FitConverter.cs:line 424 at Conversion.FitConverter.Convert(Workout workout, WorkoutSamples workoutSamples) in D:\a\peloton-to-garmin\peloton-to-garmin\src\Conversion\FitConverter.cs:line 148 at Conversion.Converter1.Convert(String format) in D:\a\peloton-to-garmin\peloton-to-garmin\src\Conversion\IConverter.cs:line 90

@philosowaffle
Copy link
Owner

Just pushed a commit straight to master that attempts to fix this. Pull latest and give it a go. If that doesn't work I'll try to do a stretching or strength workout tomorrow so I have data to reproduce with.

@bombbr
Copy link
Author

bombbr commented Jul 13, 2021

Worked on my end, thank you!

@Novelus23
Copy link

@philosowaffle my apologies, I'm a windows exe user, how would I go about updating my application with the latest?

@philosowaffle
Copy link
Owner

@Novelus23 - I updated the docs to include instructions on how to get the latest exe, looks like they were previously a little out of date, but should be correct now.

@philosowaffle philosowaffle changed the title Error: Failed to convert workout data Error: Failed to convert Strength/Stretching Workouts Jul 13, 2021
@philosowaffle
Copy link
Owner

Fixed with v2.0.4

@iggbom
Copy link

iggbom commented Jul 14, 2021

I got this same issue with a bike workout with code that I pulled after the #136 fix. I don't think its specific to stretching or strength workouts.

The difference with previous workouts is that this specific workout I was not wearing an HR monitor so no HR data was captured.

2021-07-13 18:02:41.531 -07:00 [ERR] Failed to convert workout data ed0afa0436704841bf890e666da1de39_30_min_Power_Zone_Endurance_Ride_with_Olivia_Amato ./working/downloaded/ed0afa0436704841bf890e666da1de39_30_min_Power_Zone_Endurance_Ride_with_Olivia_Amato.json
System.InvalidOperationException: Nullable object must have a value.
   at System.Nullable`1.get_Value()
   at Conversion.FitConverter.GetSessionMesg(Workout workout, WorkoutSamples workoutSamples, DateTime startTime, DateTime endTime, UInt16 numLaps) in /build/src/Conversion/FitConverter.cs:line 436
   at Conversion.FitConverter.Convert(Workout workout, WorkoutSamples workoutSamples) in /build/src/Conversion/FitConverter.cs:line 148
   at Conversion.Converter`1.Convert(String format) in /build/src/Conversion/IConverter.cs:line 90

@philosowaffle philosowaffle unpinned this issue Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants