No. The schema element at that point has minOccurs=0 maxOccurs=0 which means it doesn't exist. PyXB seems to remove it, which means the remaining reference to it while building the automaton fails. This is now filed as issue #79. I don't know when it will be worked.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I attempt to import the module that gets generated I get an KeyError. Did I do something wrong during generation.
No. The schema element at that point has
minOccurs=0 maxOccurs=0
which means it doesn't exist. PyXB seems to remove it, which means the remaining reference to it while building the automaton fails. This is now filed as issue #79. I don't know when it will be worked.The schema you referenced is correct. Any ideas on a possible workaround? Or a way to exclude pieces of a schema from having code generated?
The schema you referenced is correct. Any ideas on a possible workaround? Or a way to exclude pieces of a schema from having code generated?
If you delete the filler elements from within the sequence, the bindings module can be imported.