-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TypeError]: fromisoformat: argument must be str #29
Comments
Hi ! Seems like the timestamp of a specific record isn't formatted as expected. Could you provide the following informations to help debug ?
As this is processsing quite sensitive datas, I do not log any records. That makes troubleshooting harder, but if necessary I'll create a more verbose version for you to run so we can fix this issue. Also on a separate note, this makes me realize that I should handle more gracefully such unexpected errors, rather than 'exploding' :) Regards, |
IOS Version is latest 17.5.1 i asked ChatGPT to help me with code to skip the malformed records etc and now it finishes but i noticed this
and the end shows
but only workouts are imported, every other dashboard is blank i also noticed that at the end of the ingest, it wipes the DB and restarts by unzipping the export and starting over, so i again asked chatGPT to give me the code to stop this and now it looks at the export.zip date and if it hasnt changed it doesnt start over so that maybe an idea.. unless this is specific to my case that it restarts over |
actually, on further checks, i DO see some data, BMI, Body Mass, some heartrate, but no sleep at all, and nothing on the health specific metrics dash |
430000 records for a 130Mb export file is quite low, should be expecting around 3-4millions records. That's why not all of your data is showing up. I've pushed what I believe is a first fix on this issue. I think some of your records do not have a Could you please change the ingester image to |
it doesnt stop now, but it doesnt continue past the same amount of records as before, and it also restarts over and over, when it restarts it seems to wipe the DB of any records
i also see this, im not sure if its relevant ?
|
Regarding the wiping of previous data this is expected behavior. I would suggest re-exporting your health data from your iPhone and starting again with this 'fresh' export, it's not uncommon for the export to be borked (see #4 and #14. This is also why you see a 'Removing potentially malformed XML..' line at the start, I try to fix it before loading it as a quick and dirty prevention step but this might not fix all possible cases.) If the new export doesn't work, I would suggest using an XML linter to verify the validity of the file ? |
Ah Ha!
and the CDA xml export have the file terminated in the wrong place, i i moved the below to the end of the file from another place where it was wrongly placed
and i ended up
but it still remains that the ingest process restarts after this and wipes the DB |
Ok, I think we weren't understanding each other. The ingester is supposed to clear the db when starting up. But it's not supposed to loop indefinitely. I believe you added Regarding the export itself, I'm glad we found the issue. I'll improve the documentation to mention explicitely the fact that the export can be messed up. |
ahh! that makes sense, i assumed the ingester should run indefinitely and all my containers are set to restart like this so its a habit, thanks for your help on this |
if its helpful in the future, i am using this on the exported xml files
which fixes the files |
What happened?
Hi, I'm trying to get my data in grafana, i found your importer which seems perfect but the import keeps crashing at
Inserted 430000 records
over and over, always the same place, any ideas what might be going on here ?export.zip is 131MB in size
Environment
Docker
Relevant log output
docker-compose.yml
The text was updated successfully, but these errors were encountered: