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

AssertionError in encode of I062/380 dict repetitive #3

Open
jmnb-sdbg-edi opened this issue Apr 23, 2020 · 0 comments
Open

AssertionError in encode of I062/380 dict repetitive #3

jmnb-sdbg-edi opened this issue Apr 23, 2020 · 0 comments

Comments

@jmnb-sdbg-edi
Copy link

jmnb-sdbg-edi commented Apr 23, 2020

assert type(db) is list

Attempting to encode fields such as I062/380 is not possible because the value of key 380: is a dict. Example:

from asterixed import asterix as ast
map={62:
{ 10:{'SAC':0,'SIC':0}
, 40:{'TrkN':0}
, 70:{'ToT':0}
, 80:{'MON':0, 'SPI':0, 'MRH':0, 'SRC':0, 'CNF':0, 'FX':0, 'SIM':0, 'TSE':0, 'TSB':0, 'FPC':0, 'AFF':0, 'STP':0, 'KOS':0, 'AMA':0, 'MD4':0, 'ME':0, 'MI':0, 'MD5':0, 'CST':0, 'PSR':0, 'SSR':0, 'MDS':0, 'ADS':0, 'SUC':0, 'AAC':0, 'SDS':0, 'EMS':0, 'PFL':0, 'FPLT':0, 'PFT':0, 'DUPT':0, 'DUPF':0, 'DUPM':0, 'spare':0}
, 380:{'ADR':1, 'FX':0}
}
ast.encode(map)

gives:

Traceback:
...
  File "asterix.py", line 272, in encoded_repetitive
    assert type(db) is list
AssertionError

during encoding of key 380.

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