ldparser icon indicating copy to clipboard operation
ldparser copied to clipboard

UnicodeDecodeError and Datatype 5 not recognised.

Open JoshButton opened this issue 5 years ago • 1 comments

Hi gotzl,

Thank you for your fantastic script. With the latest version I am getting a UnicodeDecodeError. image

I can get around this by adding an ignore attribute to the .decode on line 407 return bytes.decode('ascii','ignore').strip().rstrip('\0').strip()

Though after this fix when parsing a .ld file from a real MoTec data logger file I get the Datatype 5 not recognised error mentioned in issue #4. As was mentioned there I fixed this error by adding 0x05 to in32 at line 352 as below (not sure if this is how to fix this error properly but this seems to work): elif dtype_a in [0, 0x05]: dtype = [None, np.int16, None, np.int32][dtype-1]

Hope this helps with your development.

JoshButton avatar May 22 '20 00:05 JoshButton

Again, didn't notice the issues appearing in this project ;) Is this still an issue with the current code basis (the ascii thing)?

gotzl avatar Oct 16 '20 15:10 gotzl

No feedback, closing

gotzl avatar Apr 11 '23 06:04 gotzl