Dave -
thanks for the answer. Unfortunately, installing lxml is not really an option -
the generated module is part of
a plugin for a software with ships with its own python. Hence, installing new
packages is very messy.
You can find the xsd I'm using here:
http://www.khronos.org/files/collada_schema_1_5
Thank you for your help.
Best,
Stefan
Am 06.11.2012 um 04:49 schrieb Dave Kuhlman:
>> 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
--
Karlsruhe Institute for Technology (KIT)
Institute for Anthropomatics - IAIM
Humanoids and Intelligence Systems Lab
Stefan Ulbrich
Research Scientist
Adenauerring 2 (Building 50.20, R323)
76131 Karlsruhe, Germany
Phone: +49 721 608-45336
Fax: +49 721 608-44077
EMail: stefan.ulbr...@kit.edu
http://his.anthropomatik.kit.edu/
KIT – University of the State of Baden-Wuerttemberg and
National Research Center of the Helmholtz Association
------------------------------------------------------------------------------
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