Comments (15)
Looks like this got solved per this YouTube comment here.
from peloton-coda-sync.
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.
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.
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.
@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.
Thank you for all your work! Unfortunately I'm still getting a similar error.
from peloton-coda-sync.
Very strange. Can you copy and paste line 79 from your script here?
from peloton-coda-sync.
from peloton-coda-sync.
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.
@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.
I just tried it. Here is the end, before the error. Is that what you need?
from peloton-coda-sync.
@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.
It works! Thank you so much for all the work, it's wonderful!
from peloton-coda-sync.
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?
from peloton-coda-sync.
@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:
from peloton-coda-sync.
Related Issues (7)
- Some classes with double entries HOT 7
- Google Apps Script Error HOT 2
- Google Apps Script Error HOT 2
- Exceeded maximum execution time HOT 11
- 404 Error HOT 1
- 10 Most Recent Rides Table/View Query HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peloton-coda-sync.