Skip to content
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

BodyMeasures import crashes the app. #240

Closed
Bobhasgithub opened this issue Nov 24, 2021 · 5 comments
Closed

BodyMeasures import crashes the app. #240

Bobhasgithub opened this issue Nov 24, 2021 · 5 comments
Assignees
Labels

Comments

@Bobhasgithub
Copy link

Describe your issue
Hello,
the app crashes every time I try to import the "export_BodyMeasures_username.csv". So I can't transfer my weighttracking to the new phone (weight is the only thing I use the app for).

Thank you.
Bob

To Reproduce
Steps to reproduce the behavior:

  1. Export Database
  2. Try to import: "export_BodyMeasures_username.csv"
  3. App crashes

Expected behavior
File should be imported.

Desktop (please complete the following information):

  • Device: Huawai P10 / Mi Mix 2s
  • OS: Andoid 9 (old phone) Andoid 10 (new phone)
  • App-Version: 0.20.3
  • Database version: 24
@tsferguson
Copy link

I have the same issue, and have tried a few workarounds unsuccessfully.

Records from May 2021:
EF_username_BodyMeasures_datetime.csv
EF_username_CustomBodyPart_datetime.csv

These cannot be imported in the current version (0.20.3) due to crashing app.
Nor can they be imported into any of the versions since 0.19.7 - tested by installing the older versions from f-droid.

Generating new records (export_etc_etc) on current phone and version also crashes the app.

Device: Fairphone2
OS: Android 9 (10?), /e/ OS
App Version: 0.20.3

@brodeurlv
Copy link
Owner

Hi guys, can you provide me your csv files so that I can check what is wrong. I don't have the issue on my side.
Thanks

@brodeurlv brodeurlv self-assigned this Nov 30, 2021
@brodeurlv brodeurlv added the bug label Nov 30, 2021
@tsferguson
Copy link

Thanks for the quick response.

I reinstalled the app, created a dummy account, then exported 2 sets of records and attempted to import them directly into the app and into a fresh install.
Firstly, completely blank with no entries. All of these records can be imported with no crash or error. They also contain no data points.
export_BodyMeasures_MyTest.csv
export_BodyParts_MyTest.csv
export_Exercises_MyTest.csv
export_Records_MyTest.csv

Secondly, using the same install, records with dummy entries of each type. In this case, the BodyParts and BodyMeasures cause a crash, however the Exercises and Records import without issue. I think it is worth noting that the "Reset App" function does not delete custom body parts from the app - the newly created account will retain body parts previously created. This was my reason for using a fresh install to import the records.

export_BodyMeasures_MyTest.csv
export_BodyParts_MyTest.csv
export_Exercises_MyTest.csv
export_Records_MyTest.csv

Good luck!
(All tested on version 0.20.3)

@brodeurlv
Copy link
Owner

Thank you for the details. I will look into it.

brodeurlv added a commit that referenced this issue Dec 6, 2021
@brodeurlv
Copy link
Owner

My bad! This is fixed now. The unit was missing in the export.

In current version 0.20.3, you can fix this by adding a "unit" column and adding an integer that represent the unit:

  • 0: KG;
  • 1: LBS;
  • 2: STONES;
  • 3: KM;
  • 4: MILES;
  • 5: CM;
  • 6: INCH;
  • 7: PERCENTAGE;
  • 8: UNITLESS;

Example:
table,id,date,bodypart_label,mesure,profil_id,unit
EFbodymeasures,4,2021-12-06,Biceps gauche,99.0,1,5

In the next release 0.20.4, it will be simpler as the unit will be managed in text.

  • KG : "kg"
  • LBS : "lb"
  • STONES : "st"
  • KM : "km"
  • MILES : "miles"
  • CM : "cm"
  • INCH : "in"
  • PERCENTAGE : "%"
  • UNITLESS : ""

Example:
table,id,date,bodypart_label,mesure,profil_id,unit
EFbodymeasures,4,2021-12-06,Biceps gauche,99.0,1,cm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants