Skip to content

AssertionError in encode of I062/380 dict repetitive #3

Description

@jmnb-sdbg-edi

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions