Christian,

Thanks for reporting this.

I'll do a bit of looking.

A little later ... I did a little searching.  I could not find
anything in the generateDS code that is specifically related to
"Nan".

A few questions:

- Is there anything in your XML schema where it defines an
  `xsd:complexType` or an `xsd:simpleType` with the name "NaN"?

- Is there a default value defined for the `val`, `fact`, and `max`
  elements inside the `xsd:complexType` that generated the Python
  class containing the `__init__` method below?  If so, is that
  default value `NaN`?

- I don't know the context in which your XML schema is used.  Is it
  possible that users of your schema are expected to have a
  definition of `NaN`?  In Python it might even be something like
  this: `from numpy import NaN`.  OK, I admit that is a very low
  probability.  Still, ...

So, I'm likely to need more information.

Could you please send me your XML schema so that I can reproduce
this error.  If you schema is proprietary or confidential, perhaps
you could copy only the `xsd:complexType` definition that defines
the type from which the class containing the `__init__` method is
generated.  I believe it would be the `xsd:complexType` definition
in your schema whose name is the same as the class containing the
`__init__` method that you sent.  And, it would be helpful to know
if there is a definition of `NaN` somewhere in that schema.

Thanks for help with this issue.

Dave

On Fri, Dec 07, 2018 at 03:11:04PM +0100, Chris (effeci.info) wrote:
> Hi,
> 
> I'm trying to use generateDS with an XSD.
> When I use the generated class, the error 
> 
> def __init__(self, val=NaN, fact=NaN, max=NaN, type_=None, for_='self', 
> forName='', ptType='all', extLst=None, **kwargs_):
> NameError: name 'NaN' is not defined
> 
> is raised.
> 
> What I do in the wrong way or which is the missing module?
> 
> thanks in advance
> Christian 
> 
> 

-- 

Dave Kuhlman
http://www.davekuhlman.org

-- 

Dave Kuhlman
http://www.davekuhlman.org


_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to