[pyxb-users] Problem when importing schemas when there is a property called Namespace
Brought to you by:
pabigot
From: Vladimir T. <ins...@gm...> - 2013-02-27 16:27:25
|
Hi all, Today I hit a problem while I was trying to import the generated bindings for a particular schema. After some debugging I found out that the problem is actually with the schema - it defines a property called "Namespace" (yep ..) and in the generated code there is something like this: Namespace = property(__Namespace.value, __Namespace.set, None, u'none\nThe namespace of the API definition.\n false') Now this is a problem because Namespace is expected to be of type 'Namespace' but now it is of type 'property': File "/usr/local/lib/python2.6/dist-packages/pyxb/namespace/__init__.py", line 183, in __init__ raise pyxb.LogicError('ExpandedName must include a valid (perhaps absent) namespace, or None.') On line 183 in this file we have: if (ns is not None) and not isinstance(ns, Namespace): raise pyxb.LogicError('ExpandedName must include a valid (perhaps absent) namespace, or None.') 'ns' will be of type 'property' because of the code above. The 'Namespace' property overrides the 'Namespace' variable defined in the beginning of the generated bindings: Namespace = pyxb.namespace.NamespaceForURI(...) pyxbgen --version pyxbgen from PyXB 1.1.4 Unfortunately I cannot modify the schemas because I am not the owner. Does anyone know how I can fix this (easy way)? It is extremely important for me. Regards, Vladimir |