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

TypeError: 'dict' object is not callable #90

Closed
nonmeeboon opened this issue Nov 14, 2022 · 2 comments
Closed

TypeError: 'dict' object is not callable #90

nonmeeboon opened this issue Nov 14, 2022 · 2 comments

Comments

@nonmeeboon
Copy link

Hello,
I'm trying to use the decode function by following through the example code but end up getting the error saying "TypeError: 'dict' object is not callable". This is code:
decoded_s = decode("!AIVDM,1,1,,B,15NG6V0P01G?cFhE`R2IU?wn28R>,0*05")

May be it's something that I did not set up correctly. Can you please give me an advice on how to fix this issue? Thank you very much.

@ghost
Copy link

ghost commented Nov 14, 2022

Hi,

You have to use a NMEAMessage object (see README)

import pyais

message = pyais.NMEAMessage(b"!AIVDM,1,1,,B,15NG6V0P01G?cFhE`R2IU?wn28R>,0*05")
decoded = message.decode()
data = decoded.asdict()

@nonmeeboon
Copy link
Author

Thank you! It's working great now.

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

1 participant