Hi all,
I'm making my first contact with pyxb, and so far it seems to only exist to
generate odd errors.
I've tried to have it parse a document with:
> import govtalkenvelope as g
> g.CreateFromDocument("""[xml taken from
http://xmlgw.companieshouse.gov.uk/example_http.html]""")
Traceback (most recent call last):
File "<stdin>", line 35, in <module>
File "govtalkenvelope.py", line 32, in CreateFromDocument
saxer.parse(StringIO.StringIO(xml_text))
File "C:\Python27\Lib\xml\sax\expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "C:\Python27\Lib\xml\sax\xmlreader.py", line 123, in parse
self.feed(buffer)
File "C:\Python27\Lib\xml\sax\expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "C:\Python27\Lib\xml\sax\expatreader.py", line 338, in
start_element_ns
AttributesNSImpl(newattrs, qnames))
File
"C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\pyxb\binding\sax
er.py", line 310, in startElementNS
element_binding = name_en.elementBinding()
File
"C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\pyxb\namespace\_
_init__.py", line 96, in __getattr__
category_value =
self.namespace().categoryMap(name).get(self.localName())
File
"C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\pyxb\namespace\_
_init__.py", line 293, in categoryMap
raise pyxb.NamespaceError(self, '%s has no category %s' % (self,
category))
pyxb.exceptions_.NamespaceError:
http://www.govtalk.gov.uk/schemas/govtalk/govta
lkheader has no category elementBinding
Needless to say, it's less than clear what this is supposed to mean. Any
suggestions as to what might be causing this, or indeed how in general to
deal with pyxb's exception messages?
Marcin
--
Marcin Tustin
Tel: 07773 787 105
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
pyxb-users mailing list
pyxb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyxb-users