> From: Stefan Ulbrich
>Sent: Monday, November 5, 2012 9:09 AM
> 
> Hi,
> 
> On a system without lxml installed, the generatds runs fine, but
> when calling 'parse' I get the following error message: 
> 
> --> namespace = node.nsmap.get(prefix)
> AttributeError: nsmap
> 
> Any clue how to fix this error?
> 

Stefan -

I looked into this quickly.  I believe that what is happening is
that the generated code is using that nsmap while attempting to turn
a namespace prefix back into a namespace reference (a URI).  So, if in your
XML instance document, there are attribute names that have namespace
prefixes, then when you run the module generated by generateDS.py
you will need lxml installed.

I'll have to investigate more closely to make sure I'm right about
this, and will try to do so in a couple of days.

And, of course, one solution to this problem is to install lxml.  Of
course, you already knew that.  Is installing lxml a problem in your
case?  Even if not, something should be done to handle this case
more cleanly.

I'll have to look more closely to see if there is some work-around
that does not involve using nsmap.  But, my suspicion is that it
would be messy and likely to have errors.

If I learn anything more, I'll let you know.

Thanks for letting me know about this.  I hope to have time to give
it some attention in just a few days.

- Dave




--


Dave Kuhlman
http://www.rexx.com/~dkuhlman

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to