jwoglom / tconnectsync

Syncs data from Tandem Source (formerly t:connect) to Nightscout for the t:slim X2 and Mobi insulin pumps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Hub images not being updated (Docker on Synology)

ariana-wolfkiel opened this issue · comments

Reading the log below I'm assuming self.patientObjectId = j["user"]["patientObjectId"] means that the environmental variables aren't getting in.

Does the fix for reading the environment variables from $HOME/.config/tconnectsync/.env work for Docker? When I tried it, the path doesn't exist. I tried mounting the .env file on "/home/appuser/tconnectsync/.env" and /home/.config/tconnectsync/.env . Neither one worked.

Running Docker on Synology using the GUI. GUI allows me to put in environment variables but I can't change the execution command after I create the container (annoying). The below uses execution command: "python3 -u main.py --auto-update"

2022-02-10 08:33:16 | stdout | KeyError: 'patientObjectId'
2022-02-10 08:33:16 | stdout | self.patientObjectId = j["user"]["patientObjectId"]
2022-02-10 08:33:16 | stdout | File "/home/appuser/tconnectsync/api/android.py", line 72, in login
2022-02-10 08:33:16 | stdout | self.login(email, password)
2022-02-10 08:33:16 | stdout | File "/home/appuser/tconnectsync/api/android.py", line 41, in init
2022-02-10 08:33:16 | stdout | self._android = AndroidApi(self.email, self.password)
2022-02-10 08:33:16 | stdout | File "/home/appuser/tconnectsync/api/init.py", line 54, in android
2022-02-10 08:33:16 | stdout | last_event = tconnect.android.last_event_uploaded(PUMP_SERIAL_NUMBER)
2022-02-10 08:33:16 | stdout | File "/home/appuser/tconnectsync/autoupdate.py", line 30, in process_auto_update
2022-02-10 08:33:16 | stdout | process_auto_update(tconnect, nightscout, time_start, time_end, args.pretend)
2022-02-10 08:33:16 | stdout | File "/home/appuser/main.py", line 76, in main
2022-02-10 08:33:16 | stdout | main()
2022-02-10 08:33:16 | stdout | File "/home/appuser/main.py", line 83, in
2022-02-10 08:33:16 | stdout | Traceback (most recent call last):
2022-02-10 08:33:16 | stdout | Starting auto-update between 2022-02-09 08:33:16.338007 and 2022-02-10 08:33:16.338007
2022-02-10 08:33:03 | stdout | KeyError: 'patientObjectId'
2022-02-10 08:33:03 | stdout | self.patientObjectId = j["user"]["patientObjectId"]
2022-02-10 08:33:03 | stdout | File "/home/appuser/tconnectsync/api/android.py", line 72, in login
2022-02-10 08:33:03 | stdout | self.login(email, password)
2022-02-10 08:33:03 | stdout | File "/home/appuser/tconnectsync/api/android.py", line 41, in init
2022-02-10 08:33:03 | stdout | self._android = AndroidApi(self.email, self.password)
2022-02-10 08:33:03 | stdout | File "/home/appuser/tconnectsync/api/init.py", line 54, in android
2022-02-10 08:33:03 | stdout | last_event = tconnect.android.last_event_uploaded(PUMP_SERIAL_NUMBER)
2022-02-10 08:33:03 | stdout | File "/home/appuser/tconnectsync/autoupdate.py", line 30, in process_auto_update
2022-02-10 08:33:03 | stdout | process_auto_update(tconnect, nightscout, time_start, time_end, args.pretend)
2022-02-10 08:33:03 | stdout | File "/home/appuser/main.py", line 76, in main
2022-02-10 08:33:03 | stdout | main()
2022-02-10 08:33:03 | stdout | File "/home/appuser/main.py", line 83, in
2022-02-10 08:33:03 | stdout | Traceback (most recent call last):
2022-02-10 08:33:03 | stdout | Starting auto-update between 2022-02-09 08:33:03.449161 and 2022-02-10 08:33:03.449161

commented

patientObjectId was never used, it was removed from the code a couple months ago.

#15

Hi @ariana-wolfkiel, like @policetonyR mentioned there was a change made which should hopefully fix this a few months ago. Can I ask what version you're running of tconnectsync? Should be able to run with --help to see the version. There have been a significant number of under-the-hood changes since September so would highly recommend upgrading. If you're still experiencing issues on the latest version, happy to help troubleshoot.

I used the Synology Docker 3rd party package to pull the docker container from Github. The version was "jwoglom-tconnectsync:latest". I pulled it yesterday so unless you've updated since then it should be the most current.

Just to be sure, I deleted the container, created a new one and added command "--help" to the execution command resulting in Execution Command "python3 -u main.py --help". I didn't put in any environmental variable or file mounts (.env). stdout from the log file shows help text but for some reason the version information isn't showing up.

Here is the result:
2022-02-10 22:08:01 | stdout | to log in.
2022-02-10 22:08:01 | stdout | can be used
2022-02-10 22:08:01 | stdout | credentials
2022-02-10 22:08:01 | stdout | t:connect
2022-02-10 22:08:01 | stdout | provided
2022-02-10 22:08:01 | stdout | the
2022-02-10 22:08:01 | stdout | checks that
2022-02-10 22:08:01 | stdout | If set,
2022-02-10 22:08:01 | stdout | --check-login
2022-02-10 22:08:01 | stdout | Nightscout.
2022-02-10 22:08:01 | stdout | with
2022-02-10 22:08:01 | stdout | and syncs
2022-02-10 22:08:01 | stdout | t:connect
2022-02-10 22:08:01 | stdout | from
2022-02-10 22:08:01 | stdout | updates
2022-02-10 22:08:01 | stdout | checks for
2022-02-10 22:08:01 | stdout | tinuously
2022-02-10 22:08:01 | stdout | If set, con
2022-02-10 22:08:01 | stdout | --auto-update
2022-02-10 22:08:01 | stdout | date.
2022-02-10 22:08:01 | stdout | --until-
2022-02-10 22:08:01 | stdout | and
2022-02-10 22:08:01 | stdout | --from-date
2022-02-10 22:08:01 | stdout | used with
2022-02-10 22:08:01 | stdout | Cannot be
2022-02-10 22:08:01 | stdout | read in.
2022-02-10 22:08:01 | stdout | data to
2022-02-10 22:08:01 | stdout | t:connect
2022-02-10 22:08:01 | stdout | of days of
2022-02-10 22:08:01 | stdout | The number
2022-02-10 22:08:01 | stdout | --days DAYS
2022-02-10 22:08:01 | stdout | date.
2022-02-10 22:08:01 | stdout | --start-
2022-02-10 22:08:01 | stdout | with
2022-02-10 22:08:01 | stdout | specified
2022-02-10 22:08:01 | stdout | . Must be
2022-02-10 22:08:01 | stdout | (inclusive)
2022-02-10 22:08:01 | stdout | data until
2022-02-10 22:08:01 | stdout | process
2022-02-10 22:08:01 | stdout | date to
2022-02-10 22:08:01 | stdout | The newest
2022-02-10 22:08:01 | stdout | --end-date END_DATE
2022-02-10 22:08:01 | stdout | date.
2022-02-10 22:08:01 | stdout | with --end-
2022-02-10 22:08:01 | stdout | specified
2022-02-10 22:08:01 | stdout | Must be
2022-02-10 22:08:01 | stdout | data from.
2022-02-10 22:08:01 | stdout | process
2022-02-10 22:08:01 | stdout | date to
2022-02-10 22:08:01 | stdout | The oldest
2022-02-10 22:08:01 | stdout | --start-date START_DATE
2022-02-10 22:08:01 | stdout | details
2022-02-10 22:08:01 | stdout | logging
2022-02-10 22:08:01 | stdout | extra
2022-02-10 22:08:01 | stdout | mode: show
2022-02-10 22:08:01 | stdout | Verbose
2022-02-10 22:08:01 | stdout | -v, --verbose
2022-02-10 22:08:01 | stdout | Nightscout.
2022-02-10 22:08:01 | stdout | any data to
2022-02-10 22:08:01 | stdout | not upload
2022-02-10 22:08:01 | stdout | mode: do
2022-02-10 22:08:01 | stdout | Pretend
2022-02-10 22:08:01 | stdout | --pretend
2022-02-10 22:08:01 | stdout | exit
2022-02-10 22:08:01 | stdout | message and
2022-02-10 22:08:01 | stdout | help
2022-02-10 22:08:01 | stdout | show this
2022-02-10 22:08:01 | stdout | -h, --help
2022-02-10 22:08:01 | stdout | optional arguments:
2022-02-10 22:08:01 | stdout |  
2022-02-10 22:08:01 | stdout | Nightscout.
2022-02-10 22:08:01 | stdout | to
2022-02-10 22:08:01 | stdout | t:connect
2022-02-10 22:08:01 | stdout | Diabetes
2022-02-10 22:08:01 | stdout | from Tandem
2022-02-10 22:08:01 | stdout | IOB data
2022-02-10 22:08:01 | stdout | basal, and
2022-02-10 22:08:01 | stdout | bolus,
2022-02-10 22:08:01 | stdout | Syncs
2022-02-10 22:08:01 | stdout |  
2022-02-10 22:08:01 | stdout | [--check-login]
2022-02-10 22:08:01 | stdout | [--auto-update]
2022-02-10 22:08:01 | stdout | [--days DAYS]
2022-02-10 22:08:01 | stdout | [--end-date END_DATE]
2022-02-10 22:08:01 | stdout | [--start-date START_DATE]
2022-02-10 22:08:01 | stdout | [-v]
2022-02-10 22:08:01 | stdout | [--pretend]
2022-02-10 22:08:01 | stdout | [-h]
2022-02-10 22:08:01 | stdout | usage: main.py

Oh, I think I see the problem here. The automation I had previously set up to build new images on Docker Hub when I create GitHub releases broke some number of months ago. This becomes obvious to see when, on this page, "latest" is 7 months old!

https://hub.docker.com/r/jwoglom/tconnectsync/tags

Give me a day or so to try and fix this.

@ariana-wolfkiel I have updated the images available on Docker Hub: https://hub.docker.com/r/jwoglom/tconnectsync/tags?page=1&ordering=last_updated

Please try re-pulling the docker image

Fixed. Thanks!