I try to convert xsd file in python module via PyXBgen.
For CEBDBlock.xsd (attachment) I write : python pyxbgen -u CEBDBlock.xsd -m CEBDBlock
But PyXBgen send me an error, it didn't find the URL. I tried to debug and i found that PyXBgen searchs in the current directory and not in internet. To overcome this issue, I put the xmldsig-core-schema.xsd in the same directory than CEBDBlock. With this way the first step seems to work (why have I to do this ?)
After this I code this in my module :
CEBDBlock_class = CEBDBlock.CreateFromDocument(CEBDBlock_xml)
And again I had an error : pyxb.exceptions_.SimpleTypeValueError: Type {http://www.w3.org/2001/XMLSchema}duration cannot be created from: (duration(seconds=300),)
This URL is from of the CEBDBlock.xml and I don't know why in this case I can't creat this class. (I have a case easier, without namespace which work perfectly).
Hi, first thank to read this
I try to convert xsd file in python module via PyXBgen.
For CEBDBlock.xsd (attachment) I write : python pyxbgen -u CEBDBlock.xsd -m CEBDBlock
But PyXBgen send me an error, it didn't find the URL. I tried to debug and i found that PyXBgen searchs in the current directory and not in internet. To overcome this issue, I put the xmldsig-core-schema.xsd in the same directory than CEBDBlock. With this way the first step seems to work (why have I to do this ?)
After this I code this in my module :
CEBDBlock_class = CEBDBlock.CreateFromDocument(CEBDBlock_xml)
And again I had an error : pyxb.exceptions_.SimpleTypeValueError: Type {http://www.w3.org/2001/XMLSchema}duration cannot be created from: (duration(seconds=300),)
This URL is from of the CEBDBlock.xml and I don't know why in this case I can't creat this class. (I have a case easier, without namespace which work perfectly).
Can you advise me ?
Thanks for your help
Last edit: Hureau 2019-09-17