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

Cannot convert specifications for CAT021 2.6 to xml #210

Closed
egregorimar opened this issue Nov 8, 2022 · 0 comments · Fixed by #211
Closed

Cannot convert specifications for CAT021 2.6 to xml #210

egregorimar opened this issue Nov 8, 2022 · 0 comments · Fixed by #211

Comments

@egregorimar
Copy link
Contributor

Hello,

I am trying to execute the following command to obtain the CAT021 2.6 specifications in xml:

curl https://zoranbosnjak.github.io/asterix-specs/specs/cat021/cats/cat2.6/definition.json | python3 asterixjson2xml.py

But I get the following error:

Traceback (most recent call last):
  File "/Users/my_user/asterix/asterix/asterix-specs-converter/asterixjson2xml.py", line 717, in <module>
    result = cat.parse()
  File "/Users/my_user/asterix/asterix/asterix-specs-converter/asterixjson2xml.py", line 693, in parse
    self.cat.render()
  File "/Users/my_user/asterix/asterix/asterix-specs-converter/asterixjson2xml.py", line 643, in render
    i.render()
  File "/Users/my_user/asterix/asterix/asterix-specs-converter/asterixjson2xml.py", line 599, in render
    Variation.create(self, item).render()
  File "/Users/my_user/asterix/asterix/asterix-specs-converter/asterixjson2xml.py", line 367, in realRender
    self.oldRender()
  File "/Users/my_user/asterix/asterix/asterix-specs-converter/asterixjson2xml.py", line 419, in render
    Bits(self, item, bitsFrom, bitsTo).render()
  File "/Users/my_user/asterix/asterix/asterix-specs-converter/asterixjson2xml.py", line 181, in render
    raise Exception('unexpected variation type {}'.format(vt))
Exception: unexpected variation type Group

However, it works for the previous version (CAT021 2.5):

curl https://zoranbosnjak.github.io/asterix-specs/specs/cat021/cats/cat2.5/definition.json | python3 asterixjson2xml.py

Thank you!

zoranbosnjak added a commit to zoranbosnjak/asterix that referenced this issue Dec 5, 2022
Some new asterix editions contain nested 'Group' item inside 'Extended'.
In such case, a 'Group' item is processed like regular 'Element'.

Fixes CroatiaControlLtd#210
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.

1 participant