gotzl / ldparser

Parser for MoTec ld files
GNU General Public License v3.0
60 stars 14 forks source link

Issue using the new version #2

Closed j-antunes closed 4 years ago

j-antunes commented 4 years ago

Hello,

Thank you for your hard work in creating this tool! I was using the previous version and it was working great! I tried the new version, but I'm having some errors.

In particular I'm having the following error: In the function "decode_string" when it tries to decode the following bytes: "b'\x85\x00Copyright (C) 1997-2019 Motec Holdings P/L\nC127 V6.11M Aug 19'"

It gives the following error: "line 415, in decode_string return bytes.decode('ascii').strip().rstrip('\0').strip() UnicodeDecodeError: 'ascii' codec can't decode byte 0x85 in position 0: ordinal not in range(128)"

I google a bit and I believe the error is related to the byte 0x85. It is not being able to be decode.

image

Thank you!

gotzl commented 4 years ago

Would it be possible for you to send me the file?

j-antunes commented 4 years ago

Hey, thank you for getting back to me!

Do you know what would be the best way to reach you, or to send you the file?

Thank you!

gotzl commented 4 years ago

Hi, you can put it here: https://tinyurl.com/y7b97x5m

j-antunes commented 4 years ago

Hey!

I tried to use the url that you've sent, but I can't upload a file. I've uploaded the file here: https://we.tl/t-ny2MS1KiYD

Let me know if you need any help, would be happy to lend a hand!

gotzl commented 4 years ago

Hm, you're right, my link doesn't work... Strange... Anyways, I've got the file now. I'll check it out later. Cheers!

j-antunes commented 4 years ago

Thank you!

Please let me know if you need anything else!

gotzl commented 4 years ago

Hi, I've worked around this issue in 9bbaeab. It's not a fix perse and the parser will print somekind of 'warning', but you should be able to use your files again. I'll have to look into other files and see what information they write at that position...

j-antunes commented 4 years ago

Thank you for the quick fix!

You mentioned that you would need to see other files to "see what information they write at that position..." What other files would you need? Is this something I can help you with?

gotzl commented 4 years ago

Sure. I would need files created by different loggers / created by different sources. I only learn about the .ld data format by reverse engineering and a broad spectrum of different files helps to understand the different parts in the files. So, if you have more files from different loggers, it would help if you would be able to make them available to me.

j-antunes commented 4 years ago

Sure thing! I'll see what I can get.

Out of curiosity, do you know any book or an online resource where I could learn more about how decoding works? I'm having a bit of difficulty understanding how your code works, because I'm not comfortable of how deconding works.