M0r13n / pyais

AIS message decoding and encoding in Python (AIVDM/AIVDO)
MIT License
176 stars 61 forks source link

PiPY out of date? #105

Closed AllNamesWereTakenIsNotAvailable closed 1 year ago

AllNamesWereTakenIsNotAvailable commented 1 year ago

Apologies if I this turns out to be wrong but the example documentation on the Github and PiPY shows the following for encoding:

from pyais.encode import MessageType5, encode_msg

payload = MessageType5.create(mmsi="123", shipname="Titanic", callsign="TITANIC", destination="New York")
encoded = encode_msg(payload)
print(encoded)

This code does not work for me; instead I need to get my message class from messages.py. I also noticed I still have seq_id = '' in my encode.py.

Using python 3.8.10 I used pip install pyais and I got:

Requirement already satisfied: pyais in d:\python38\lib\site-packages (2.0.1)
Requirement already satisfied: attrs in d:\python38\lib\site-packages (from pyais) (21.4.0)
Requirement already satisfied: bitarray in d:\python38\lib\site-packages (from pyais) (2.4.0)

Does pyais support python 3.8.10 and is there a way to get an updated module from pip?

Kind Regards Jonathan

M0r13n commented 1 year ago

Hey,

by default pip install does not update installed packages even if newer versions are available. In order to perform an upgrade you need to pass the upgrade flag: pip install -U pyais. Then version 2.4.0 should be installed.