bakermat / suffersync Goto Github PK
View Code? Open in Web Editor NEWSyncs Wahoo SYSTM calendar with intervals.icu
License: MIT License
Syncs Wahoo SYSTM calendar with intervals.icu
License: MIT License
Hi, thank you very much for this helpful little tool. Since today I'm getting the following error: Wahoo SYSTM Error: Cannot return null for non-nullable field CompletionData.name.
I checked and rebuild the config file without success. Was there something changed on the Wahoo side?
Thank you
@bakermat first of all, thanks for this really cool tool!
I noticed today that a "workout" is not being synchronised. Maybe it's because of the "?" in the name?
...
Uploaded 2023-12-09: Foot and Ankle Recovery (Yoga)
[Errno 22] Invalid argument: './zwo/2023-12-09_Why_Do_We_Bike?.zwo'
Something went wrong: [Errno 22] Invalid argument: './zwo/2023-12-09_Why_Do_We_Bike?.zwo'
Uploaded 2023-12-11: Cadence Builds and Holds (VirtualRide)
...
Passwords with special characters aren't escaped properly, causing an error:
File “/usr/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/usr/local/lib/python3.8/dist-packages/suffersync.py”, line 451, in
main()
File “/usr/local/lib/python3.8/dist-packages/suffersync.py”, line 249, in main
SYSTM_PASSWORD = config.get(‘WAHOO’, ‘SYSTM_PASSWORD’)
File “/usr/lib/python3.8/configparser.py”, line 799, in get
return self._interpolation.before_get(self, section, option, value,
File “/usr/lib/python3.8/configparser.py”, line 395, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File “/usr/lib/python3.8/configparser.py”, line 442, in _interpolate_some
raise InterpolationSyntaxError(
configparser.InterpolationSyntaxError: ‘%’ must be followed by ‘%’ or ‘(’, found: ‘%xxx’
I am in EST and the activities that I have set in SYSTM appear 1 day earlier in intervals.icu. For example my upcoming ride scheduled for Thursday this week in SYSTM is show as scheduled for Wednesday in intervals.icu after syncing. Could this be a timezone issue?
@bakermat Thank you for sharing this! Really usefull tool!
As you mentioned, a few workouts don't match 100%, i noticed that this happened with Recharger.
I was messing around with your code and found something that might help. They are using "twentyMin" and "map" with power values on some workouts, maybe is a new feature or something.
With this code i was abble to get Recharger right, not tested with others yet:
for interval in range(len(workout_json)):
for tracks in range(len(workout_json[interval]['tracks'])):
for item in workout_json[interval]['tracks'][tracks]['objects']:
seconds = int(item['size'] / 1000)
if 'ftp' in item['parameters']:
ftp = item['parameters']['ftp']['value']
if 'rpm' in item['parameters']:
rpm = item['parameters']['rpm']['value']
if 'hrZone' in item['parameters']:
zone = item['parameters']['hrZone']['value']
if 'rpe' in item['parameters']:
rpe = item['parameters']['rpe']['value']
if 'twentyMin' in item['parameters']:
ftp = item['parameters']['twentyMin']['value']
text = f'\n\t\t<SteadyState show_avg="1" Cadence="{rpm}" Power="{ftp}" Duration="{seconds}" Zone="{zone}" painIndex="{rpe}"/>'
f.write(text)
elif 'map' in item['parameters']:
ftp = item['parameters']['map']['value'] * MyMAP / MyFTP
text = f'\n\t\t<SteadyState show_avg="1" Cadence="{rpm}" Power="{ftp}" Duration="{seconds}" Zone="{zone}" painIndex="{rpe}"/>'
f.write(text)
elif 'ac' in item['parameters']:
ftp = item['parameters']['ac']['value'] * MyAC / MyFTP
text = f'\n\t\t<SteadyState show_avg="1" Cadence="{rpm}" Power="{ftp}" Duration="{seconds}" Zone="{zone}" painIndex="{rpe}"/>'
f.write(text)
elif 'nm' in item['parameters']:
ftp = item['parameters']['nm']['value'] * MyNM / MyFTP
text = f'\n\t\t<SteadyState show_avg="1" Cadence="{rpm}" Power="{ftp}" Duration="{seconds}" Zone="{zone}" painIndex="{rpe}"/>'
f.write(text)
else:
text = f'\n\t\t<SteadyState show_avg="1" Cadence="{rpm}" Power="{ftp}" Duration="{seconds}" Zone="{zone}" painIndex="{rpe}"/>'
f.write(text)
MyFTP, MyAC, MyMAP and MyNM are 4DP values.
When I went to run suffersync
this morning I received the following error:
the JSON object must be str, bytes or bytearray, not NoneType
Traceback (most recent call last):
File "/opt/homebrew/bin/suffersync", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/lib/python3.9/site-packages/suffersync.py", line 433, in main
f.close()
UnboundLocalError: local variable 'f' referenced before assignment
The program had been working as recently as a week or two ago. I'm on version 1.4.3 and this is happening on macOS and iPadOS with a-Shell.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.