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

ValueError: invalid literal for int() with base 16: b'' #58

Closed
AllNamesWereTakenIsNotAvailable opened this issue Mar 21, 2022 · 1 comment · Fixed by #60
Closed

ValueError: invalid literal for int() with base 16: b'' #58

AllNamesWereTakenIsNotAvailable opened this issue Mar 21, 2022 · 1 comment · Fixed by #60

Comments

@AllNamesWereTakenIsNotAvailable

Maybe this is not as intended?

I am parsing a file of all sorts of bad data and decoding it; I handle the exceptions; however this seems like a bad way to handle a missing checksum?

!AIVDM,1,1,,A,100u3FP04r28t0<WcshcQI<H0H79,0

Traceback (most recent call last): File "pyais_test.py", line 14, in <module> decoded = pyais.decode(i) File "c:\Python38\lib\site-packages\pyais\decode.py", line 34, in decode nmea = _assemble_messages(*parts) File "c:\Python38\lib\site-packages\pyais\decode.py", line 13, in _assemble_messages nmea = NMEAMessage(msg) File "c:\Python38\lib\site-packages\pyais\messages.py", line 201, in __init__ self.checksum = int(checksum[2:], 16) ValueError: invalid literal for int() with base 16: b''

All the best

@M0r13n
Copy link
Owner

M0r13n commented Mar 26, 2022

@AllNamesWereTakenIsNotAvailable Yes, you are right. Will be fixed with #60 and will be available in the next release.

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

Successfully merging a pull request may close this issue.

2 participants