Import issue from Concept2 logbook

Issue #63 resolved
Former user created an issue

When trying to import a workout from Concept2 logbook, after clicking on 'import' next to the work out I get the error message saying that "This workout doesn't contain stroke data"

Comments (7)

  1. Sander Roosendaal repo owner

    Hi Anonymous,

    Could you tell us how you got the data on Concept2 logbook? Did you use ErgData? On the Concept2 logbook, is there a "magnifying glass" symbol next to the workout? When you click on that magnifying glass, do you see a graph?

    If you don't see a graph, then rowsandall.com's reaction is perfectly fine. Our site is about rowing data. If there are no stroke data, there isn't much you can do with them.

    @gregsmith01748 We should really write this blog post explaining. The site's motto is "Free Data and Analysis. For Rowers. By Rowers." I think that this is a well chosen motto. The site is about data analytics, and the import/export functionality is there to enable users to free their data. If there are no stroke data, there is little to be freed.

    If you DO see a graph, then there is a bug somewhere. In my algorithm, I do "if 'stroke_data' in data" (where 'data' is what Concept2 sends me) and if the answer is yes, I continue to process. If the answer is no, I throw the warning that Anonymous is describing.

    I am checking the Concept2 documentation http://log.concept2.com/developers/documentation/ and seeing that they changed stroke_data to data. Let me check with Concept2

  2. Sander Roosendaal repo owner

    If it is true and 'stroke_data' has been dropped by C2, the solution would be to

    1. Get Workout summary data from /api/users/{user}/results/{result_id}
    2. Try to get Workout stroke data from /api/users/{user}/results/{result_id}/strokes

      a. Throw a user warning if the response is the following: { "message": "This workout does not have any stroke data associated with it", "status_code": 404 }

    b. Process the stroke data if the response status code is 200

  3. Sander Roosendaal repo owner

    David Hart at C2 has changed the API to always include a boolean "stroke_data". Added double checking to my code. If "stroke_data" is False, the user gets a warning "This workout does not have any stroke data associated with it". If "stroke_data" is True, the website will poll Concept2 logbook for stroke data. If this returns an error, the warning message from C2 is shown to the user. If this returns stroke data, the workout is created with the stroke data. @gregsmith01748 I think it is still useful to explain this in a blog post. I will make a draft.

  4. To Ah

    I'm fairly new to both running and the tool. I also receive the same error uploading the concept2utility to the C2log and then trying to import. I attached a screenshot from the log and it does say something about the strokes. I fear I already do the upload from the rower to the log wrongly might that be? Bildschirmfoto 2017-02-08 um 21.15.46.png

  5. Log in to comment