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

DM5 SME export does not work #1

Open
bestis opened this issue Jan 23, 2023 · 5 comments
Open

DM5 SME export does not work #1

bestis opened this issue Jan 23, 2023 · 5 comments

Comments

@bestis
Copy link

bestis commented Jan 23, 2023

Hi,

Seems that it's not standard zip. Unzip wont like it either.

C:\Users\jo\Downloads>java.exe -cp fit.jar;SdeToFit-1.0-SNAPSHOT.jar com.github.nradov.sdetofit.SdeToFit Dive_2023-01-23-0953.sde C:\Users\jo\Downloads
Exception in thread "main" java.util.zip.ZipException: zip END header not found
        at java.base/java.util.zip.ZipFile$Source.findEND(Unknown Source)
        at java.base/java.util.zip.ZipFile$Source.initCEN(Unknown Source)
        at java.base/java.util.zip.ZipFile$Source.<init>(Unknown Source)
        at java.base/java.util.zip.ZipFile$Source.get(Unknown Source)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(Unknown Source)
        at java.base/java.util.zip.ZipFile.<init>(Unknown Source)
        at java.base/java.util.zip.ZipFile.<init>(Unknown Source)
        at java.base/java.util.zip.ZipFile.<init>(Unknown Source)
        at com.github.nradov.sdetofit.suunto.SuuntoSde.<init>(SuuntoSde.java:41)
        at com.github.nradov.sdetofit.DivesSourceFactory.create(DivesSourceFactory.java:55)
        at com.github.nradov.sdetofit.SdeToFit.convert(SdeToFit.java:72)
        at com.github.nradov.sdetofit.SdeToFit.main(SdeToFit.java:68)

$ unzip -v Dive_2023-01-23-0953.sde
Archive:  Dive_2023-01-23-0953.sde
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
note:  Dive_2023-01-23-0953.sde may be a plain executable, not an archive
unzip:  cannot find zipfile directory in one of Dive_2023-01-23-0953.sde or
        Dive_2023-01-23-0953.sde.zip, and cannot find Dive_2023-01-23-0953.sde.ZIP, period.

It can export SML, which is probably Suunto XML, would hope same same without compression?

But there's the three options that I can export from DM5, would be nice if some of them would be supported to convert to as FIT.

dive-logs.zip

@nradov
Copy link
Owner

nradov commented Jan 27, 2023

That SDE file within dive-logs.zip is empty and doesn't contain any dive log files. So, the SdeToFit program is working as designed.
When you used the Suunto Dive Manager export feature are you certain that you had at least one dive selected? I was using an older version of SDM since that's what came with the D3. In the one I have you have to select the dives once, then select the menu File → Export command, then select the dives a second time.

@bestis
Copy link
Author

bestis commented Jan 27, 2023

I exported all the files with similar way. I retried, all I am able to get is 26 bytes files from the DM5. So maybe then the SDE export is broken. I also tried other dives. Same results, 26 bytes SDE:s. Other exports seems to work.

Same result is happening exporting via File -> Export -> Selected dive.

All they contain is just the start header for PKZIP.

$ hexdump Dive_2023-01-23-0953.sde
0000000 4b50 0403 0014 0000 0008 ba4b 563b 0000
0000010 0000 ffff ffff ffff ffff
000001a

So question still kind of is, is the SML file the same as SDE without compression?

@bestis
Copy link
Author

bestis commented Jan 27, 2023

Well, apparently not. At least if one renamed the .sml to 0.xml and created a zip out of it and tried to convert that.

java.exe -cp fit.jar;SdeToFit-1.0-SNAPSHOT.jar com.github.nradov.sdetofit.SdeToFit test.sde Downloads
Converting dive log: "0.xml"
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.w3c.dom.Node.getTextContent()" because the return value of "org.w3c.dom.NodeList.item(int)" is null
        at com.github.nradov.sdetofit.suunto.SuuntoXml.<init>(SuuntoXml.java:59)
        at com.github.nradov.sdetofit.suunto.SuuntoSde.<init>(SuuntoSde.java:46)
        at com.github.nradov.sdetofit.DivesSourceFactory.create(DivesSourceFactory.java:55)
        at com.github.nradov.sdetofit.SdeToFit.convert(SdeToFit.java:72)
        at com.github.nradov.sdetofit.SdeToFit.main(SdeToFit.java:68)     

Will need to think do I have time/energy to look at the code, what would be needed to have SML support, as clearly the SDE is not an option as my DM5 can't export it.

@nradov
Copy link
Owner

nradov commented Jun 3, 2023

Can you post the .sml file here?

@bestis
Copy link
Author

bestis commented Jun 4, 2023

Examples are in the first post's zip file. Link to it: https://github.com/nradov/SdeToFit/files/10483182/dive-logs.zip

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

No branches or pull requests

2 participants