alsterman / wellness2tcx

Convert MyWellness json to Training Center XML
7 stars 0 forks source link

java.lang.AssertionError: Assert failed: (= (count date-string) 10) #9

Open GitPhred opened 4 years ago

GitPhred commented 4 years ago

Hallo Marcus, Very nice tool, but I get the exception below. Are you able to help me ? I attached also the input file (if everything went well). My command was : java -jar wellness2tcx-0.1.1-standalone.jar ftpcycling20200129.txt 21:00:00 ftpcycling20200129.tcx

Kind regards, Frederik

Exception in thread "main" java.lang.AssertionError: Assert failed: (= (count date-string) 10) at wellness2tcx.helper$date_stringGT_yyyy_MM_dd.invokeStatic(helper.cljc:23) at wellness2tcx.helper$date_stringGT_yyyy_MM_dd.invoke(helper.cljc:23) at wellness2tcx.core$raw_data__GT_tcx_map.invokeStatic(core.cljc:76) at wellness2tcx.core$raw_data__GT_tcx_map.invoke(core.cljc:73) at wellness2tcx.core$_main.invokeStatic(core.cljc:105) at wellness2tcx.core$_main.invoke(core.cljc:102) at clojure.lang.AFn.applyToHelper(AFn.java:160) at clojure.lang.AFn.applyTo(AFn.java:144) at wellness2tcx.core.main(Unknown Source) ftpcycling20200129.txt

gcsosso commented 3 years ago

Hallo Marcus, Very nice tool, but I get the exception below. Are you able to help me ? I attached also the input file (if everything went well). My command was : java -jar wellness2tcx-0.1.1-standalone.jar ftpcycling20200129.txt 21:00:00 ftpcycling20200129.tcx

Kind regards, Frederik

Exception in thread "main" java.lang.AssertionError: Assert failed: (= (count date-string) 10) at wellness2tcx.helper$date_stringGT_yyyy_MM_dd.invokeStatic(helper.cljc:23) at wellness2tcx.helper$date_stringGT_yyyy_MM_dd.invoke(helper.cljc:23) at wellness2tcx.core$raw_data__GT_tcx_map.invokeStatic(core.cljc:76) at wellness2tcx.core$raw_data__GT_tcx_map.invoke(core.cljc:73) at wellness2tcx.core$_main.invokeStatic(core.cljc:105) at wellness2tcx.core$_main.invoke(core.cljc:102) at clojure.lang.AFn.applyToHelper(AFn.java:160) at clojure.lang.AFn.applyTo(AFn.java:144) at wellness2tcx.core.main(Unknown Source) ftpcycling20200129.txt

Hello - exactly the same issue here. My knowledge of Java is close to zero, so any help would be greatly appreciated.

Thanks!

gcsosso commented 3 years ago

It'd appear this issue is identical to that identified and solved by knudfrank. It has to do with the date format:

I have now found the error. In the test data the date is formatted in the format YYYY-mm-dd, whereas in the export from the german My Wellness dataset the date is formatted as dd.mm.YYYY. It is enough to change the date to the correct format. Please adjust the code to also accept dates in other formats.

Hope this helps!