Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.

"List index out of range" using bindings built by pyxbgen #114

Open
ChrisTraina opened this issue Apr 18, 2019 · 1 comment
Open

"List index out of range" using bindings built by pyxbgen #114

ChrisTraina opened this issue Apr 18, 2019 · 1 comment

Comments

@ChrisTraina
Copy link

ChrisTraina commented Apr 18, 2019

I am updating an existing (built by someone else) project that receives XML and de-serializes it into a Python object. The project author obviously used pyxbgen to generate the necessary Python object(s). However, we have updated our schema and the old bindings will not accept our new XML (which is valid according to the schema). However, when I use pyxbgen to generate new Python classes, I now get a "list index is out of range" exception whenever I try to de-serialize XML. It does not matter what XML I try to serialize (valid, invalid, pure garbage), I always get this error.

I did a side-by-side diff of the old bindings and the ones I just generated and they are very similar (apart from some explainable differences like the path to the schema files and the stuff that was added due to changes in the schema), although there is a non-insignificant size difference (old was 766 Kb, new is only 638 Kb). Even more disconcerting, when I tried to reproduce the old bindings (using the old schema), they are even more different in size (766 Kb vs. 626 Kb).

Old bindings: # Generated 2017-10-05 11:37:54.892618 by PyXB version 1.2.6 using Python 3.5.3.final.0

New bindings: # Generated 2019-04-18 16:45:30.968311 by PyXB version 1.2.6 using Python 3.6.7.final.0

Any help would be greatly appreciated.

@ChrisTraina ChrisTraina changed the title "List index out of range" using bindings build by pyxbgen "List index out of range" using bindings built by pyxbgen Apr 18, 2019
@Varriount
Copy link

Do you have a traceback or example that demonstrates this bug?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants