Giter Site home page Giter Site logo

suffersync's People

Contributors

alexandermuehle avatar arthuracs avatar bakermat avatar joemcmonagle avatar knutpett avatar orutherfurd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

suffersync's Issues

[Errno 22] Invalid argument - perhaps the "?" in the workout-name

@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)
...

Special characters in Wahoo SYSTM password not escaped

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’

Planned Activities in Intervals.icu are off by 1 day from SYSTM

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?

Workouts that don't match 100%

@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.

UnboundLocalError: local variable 'f' referenced before assignment

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.

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.