Closed Lukazar closed 2 days ago
Should be fixed in v2.1.1. Good catch!
Thanks for the fast response. Looks like the error migrated on us:
tconnectsync | Traceback (most recent call last):
tconnectsync | File "/home/appuser/main.py", line 5, in <module>
tconnectsync | main()
tconnectsync | File "/home/appuser/tconnectsync/__init__.py", line 120, in main
tconnectsync | sys.exit(u.process(tconnect, nightscout, time_start, time_end, args.pretend, features=args.features))
tconnectsync | File "/home/appuser/tconnectsync/sync/tandemsource/autoupdate.py", line 53, in process
tconnectsync | added, event_id = ProcessTimeRange(tconnect, nightscout, tconnectDevice, pretend, features=features).process(time_start, time_end)
tconnectsync | File "/home/appuser/tconnectsync/sync/tandemsource/process.py", line 84, in process
tconnectsync | ns_entries = c.process(events, events_first_time, events_last_time)
tconnectsync | File "/home/appuser/tconnectsync/sync/tandemsource/process_user_mode.py", line 118, in process
tconnectsync | ns_entries.append(self.exercise_to_nsentry(start=items[0], stop=items[1], time_end=time_end))
tconnectsync | File "/home/appuser/tconnectsync/sync/tandemsource/process_user_mode.py", line 207, in exercise_to_nsentry
tconnectsync | pump_event_id = "%s,%s" % (start.eventId, stop.eventId)
tconnectsync | AttributeError: 'NoneType' object has no attribute 'eventId'
Looks like that elseif doesn't have a stop
.
Sorry, I'm not a python guy or I'd try to jump in and help. I'd end up doing more harm than good.
D'oh, some real brain farts in this section of the code. (why would we read from the stop variable in the "no stop time" section...)
Before rewriting this all to work with Tandem Source I had a good amount of unit tests which would typically catch stuff like this. Hoping to get around to adding those back, just had to rush the implementation of the last bits of this to get over the finish line before the EOL.
Pushed a commit/version to fix this one.
Looks good from my end!
D'oh, some real brain farts in this section of the code. (why would we read from the stop variable in the "no stop time" section...)
Ha, we've all been there. You're killing it, thanks for the fast responses.
Getting the following error after upgrading to 2.1.0
https://github.com/jwoglom/tconnectsync/blob/master/tconnectsync/sync/tandemsource/process_user_mode.py#L201
Not sure if there is more information I can provide. Thanks again for everything you guys do!