GithubHelp home page GithubHelp logo

Comments (15)

al-codaio avatar al-codaio commented on August 21, 2024

Looks like this got solved per this YouTube comment here.

from peloton-coda-sync.

ctho725 avatar ctho725 commented on August 21, 2024

This was a different problem! I fixed this and was able to run the program (I couldn't run it at all before), but now I'm getting the error I posted above. Sorry for the confusion!

from peloton-coda-sync.

al-codaio avatar al-codaio commented on August 21, 2024

Ah sorry about that! Looks like you might have done a workout that doesn't have ratings and it's a workout type I didn't account for (I was only able to test with biking, running, strength, and meditation workouts). Without seeing the details of your script, I would delete line 87 from the script for now. This the line you should delete:

{'column': 'Total Ratings',         'value': workoutData[workout]['summary']['ride']['overall_rating_count']},

Try running the script with that line removed and see if it works!

from peloton-coda-sync.

ctho725 avatar ctho725 commented on August 21, 2024

I do also have cardio and yoga. I was previously just using the app before getting the bike so I do have cycling classes with no metrics. I'm not sure if that causes an issue.

Line 87 for me is
{'column': 'Avg Resistance', 'value': workoutData[workout]['performance']['average_summaries'][2]['value']},
but removing that doesn't help, nor does removing the line you suggested (77).

from peloton-coda-sync.

al-codaio avatar al-codaio commented on August 21, 2024

@ctho725 I just made some edits and did a few tests and believe the new script works now. Copy and paste the script from here. Going to close this issue for now unless you come across the issue again!

from peloton-coda-sync.

ctho725 avatar ctho725 commented on August 21, 2024

Thank you for all your work! Unfortunately I'm still getting a similar error.

image

from peloton-coda-sync.

al-codaio avatar al-codaio commented on August 21, 2024

Very strange. Can you copy and paste line 79 from your script here?

from peloton-coda-sync.

ctho725 avatar ctho725 commented on August 21, 2024

image

from peloton-coda-sync.

al-codaio avatar al-codaio commented on August 21, 2024

Hm that's really strange, must be some weird edge case. Right below the line where it says for (workout in workoutData) {, can you put the following code and run the script? This will help me figure out which workout might be causing problems:

Logger.log(prettyPrint(workout))

After you run the script, you'll see a bunch of workout IDs getting printed to the bottom panel (Execution Log) in your screen. Let me know what the last workout ID you see is before it gives you an error.

from peloton-coda-sync.

al-codaio avatar al-codaio commented on August 21, 2024

@ctho725 Were you able to add that line of code to test which workout might be causing problems? My hunch is that there is a specific type of workout that you did which the script doesn't account for that I need to investigate.

from peloton-coda-sync.

ctho725 avatar ctho725 commented on August 21, 2024

I just tried it. Here is the end, before the error. Is that what you need?
image

from peloton-coda-sync.

al-codaio avatar al-codaio commented on August 21, 2024

@ctho725 Thanks, I think I found the error (mistake on my end) and updated the script. Try copying/pasting the script again and let me know if you still run into issues. Btw, I updated the template a little bit to include friends' workouts.

from peloton-coda-sync.

ctho725 avatar ctho725 commented on August 21, 2024

It works! Thank you so much for all the work, it's wonderful!

from peloton-coda-sync.

ctho725 avatar ctho725 commented on August 21, 2024

Just some additional feedback for you:

The monthly cycling stats doesn't seem to be working. As you can see above it's definitely reading them but they're not showing up in this table. Can I fix that somehow?
image

from peloton-coda-sync.

al-codaio avatar al-codaio commented on August 21, 2024

@ctho725 Great to hear it works! For the monthly stats, I made a mistake with the dates in the Month column. If you click on each month in 2021, you'll notice it's an actual date that got set to the 28th for some reason. Just click on each month and set the date to the beginning of the month like this and it should calculate correctly:

Screen Recording 2021-03-02 at 06 51 06 PM

from peloton-coda-sync.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.