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

Failed to Deserialize - Row Bootcamp? #497

Closed
amy26point2 opened this issue May 18, 2023 · 7 comments · Fixed by #498 or #503
Closed

Failed to Deserialize - Row Bootcamp? #497

amy26point2 opened this issue May 18, 2023 · 7 comments · Fixed by #498 or #503
Assignees
Labels

Comments

@amy26point2
Copy link

Yesterday afternoon I took a Row and a Row Bootcamp class. It was around that time that my workouts also stopped uploading to Garmin. The error that I'm seeing is: [ERR] Http Failed to deserialize response to target type: JSON
Flurl.Http.FlurlParsingException: Response could not be deserialized to JSON: GET https://api.onepeloton.com/api/user/5483d39b07974ecc9cc7b0bc057e5589/workouts?limit=6&sort_by=-created&page=0&joins=ride
---> Newtonsoft.Json.JsonSerializationException: Error converting value "caesar_bootcamp" to type 'Common.Dto.Peloton.FitnessDiscipline'. Path 'data[0].fitness_discipline', line 1, position 119.
---> System.ArgumentException: Requested value 'caesar_bootcamp' was not found.
at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, String value, Boolean disallowNumber)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)

I can only think that might be the Row Bootcamp? This is the first one that I've taken too.

@philosowaffle
Copy link
Owner

philosowaffle commented May 18, 2023

Yup, looks like P2G just wasn't ready to handle Row Bootcamp's yet. I pushed a fix that should resolve that error. If you're using the windows exe you should be able to grab the latest version from here and if you're on Docker you can pull the latest tag.

@amy26point2
Copy link
Author

Thank you! Is there an update that will work for the Mac source code install or should I just wait for the next release?

@philosowaffle
Copy link
Owner

The Update steps here should work. These steps will pull in the latest changes, even the unreleased ones.

@amy26point2
Copy link
Author

Thank you! I've been apparently still been using an old install method and did not have a local repository saved. The row bootcamp does continue to throw an error, but at least now my other workouts are syncing again. I don't know if any of this is helpful:

2023-05-19 12:52:11.972 -05:00 [WRN] Unsupported Sport Type - Skipping "Caesar_Bootcamp"
2023-05-19 12:52:11.975 -05:00 [ERR] Failed to write "Fit" file for 162ab6be2cc347a6ae83ab6fa6d88303_30_min_Classic_Rock_Bootcamp_with_Katie_Wang
System.NullReferenceException: Object reference not set to an instance of an object.
at Dynastream.Fit.Encode.Write(IEnumerable1 mesgs) in /Users/amy/Documents/GitHub/peloton-to-garmin/src/Garmin/FitSdk/Dynastream/Fit/Encode.cs:line 137 at Conversion.FitConverter.Save(Tuple2 data, String path) in /Users/amy/Documents/GitHub/peloton-to-garmin/src/Conversion/FitConverter.cs:line 39
at Conversion.Converter`1.ConvertAsync(P2GWorkout workoutData) in /Users/amy/Documents/GitHub/peloton-to-garmin/src/Conversion/IConverter.cs:line 138

@philosowaffle
Copy link
Owner

Unfortunately that error message is not telling me enough about what went wrong. I think I will need to see the original workout data to figure it out. There are two options for this:

Option 1

  1. Enable exporting JSON format here
  2. And also turn on SaveLocalCopy
  3. Next time you sync this should save a json file of the original workout data which you can upload here

Option 2

  1. Follow me on Peloton (@cyclesaurus)
  2. Once we are friends I'll be able to see your workouts and can inspect the original data
  3. After I have a copy of the data you can Unfollow me

@philosowaffle philosowaffle reopened this May 21, 2023
@amy26point2
Copy link
Author

I’ve friended you. I’m Amy26point2 on Peloton. The class was taken on 5/16. Thanks!

@philosowaffle
Copy link
Owner

Sorry for the delay. I think I have this fixed for real this time. Unfortunately, P2G has very limited support for these bootcamp workouts so it won't be able to pull in the strength data. But you will get all the HR data and other Row metrics pulled in.

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