> From: matthew lange
> Sent: Saturday, January 12, 2013 4:34 PM
> 
> I am attempting to use generateDS from both the command line and the
> GUI with a local copy of this xsd:
> 
> http://cmap.ihmc.us/xml/cmap.xsd
> 
> Both fail with File
> "/usr/local/lib/python2.7/dist-packages/_xmlplus/sax/xmlreader.py",
> line 316, in __getitem__
>     return self._attrs[name]
> KeyError: 0
> 
> Any ideas what i am doing wrong, or what is wrong with my file?
> 
> Thanks in advance.

Matthew -

I'm not too sure about this, but I believe that the clue is in the
"_xmlplus" that occurs in your traceback (and thanks for including
that traceback).  I suspect that _xmlplus is leftover on you machine
from installing PyXML back before the XML support was included in
the Python standard library.

When generateDS.py runs, it should be using lxml.  When the code
generated by generateDS.py runs, either lxml or the code in the
Python standard library is fine.

So, here is what you should do:

1. Install lxml (on the machine on which you run generateDS.py).  You
   can find it here:
   
   - http://lxml.de/
   - http://pypi.python.org/pypi/lxml/

2. Unless there is some reason why you need it (legacy code ?),
    remove _xmlplus.  Specifically, delete:

     /usr/local/lib/python2.7/dist-packages/_xmlplus/

   Removing that will ensure that Python will use the more
   up-to-date XML support in your Python 2.7 standard library.

And, finally, please let me know whether this works, so that, if I
receive another report like this from someone else, I'll know what
to tell them.  Thanks in advance.

- Dave

--


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

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to