[Python-bugs-list] [ python-Bugs-449991 ] xml.dom.pulldom exception for integers

noreply@sourceforge.net noreply@sourceforge.net
Wed, 05 Sep 2001 01:25:09 -0700


Bugs item #449991, was opened at 2001-08-10 21:02
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=449991&group_id=5470

Category: Python Library
Group: Python 2.2
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Martin v. Löwis (loewis)
Summary: xml.dom.pulldom exception for integers

Initial Comment:
>>> xml.dom.minidom.parseString(str)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.0/xml/dom/minidom.py", line 
475, in parseString
    return _doparse(pulldom.parseString, args, kwargs)
  File "/usr/lib/python2.0/xml/dom/minidom.py", line 
465, in _doparse
    toktype, rootNode = events.getEvent()
  File "/usr/lib/python2.0/xml/dom/pulldom.py", line 
187, in getEvent
    self.parser.feed(buf)
  File "/usr/lib/python2.0/xml/sax/expatreader.py", 
line 81, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.0/xml/sax/expatreader.py", 
line 160, in start_element_ns
    AttributesNSImpl(newattrs, {}))
  File "/usr/lib/python2.0/xml/dom/pulldom.py", line 
36, in startElementNS
    tagName = self._current_context[uri] + ":" + 
localname
TypeError: bad operand type(s) for +


This happened for Python 2.0. For Python <current> the 
line may be different

Suggested fix:

On the offending line, use "str()" to force conversion 
(inquisition ;-))





----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-09-05 01:25

Message:
Logged In: YES 
user_id=21627

Closing it, since there was no feedback from the submitter.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-08-11 00:48

Message:
Logged In: YES 
user_id=21627

Can you give the exact document that caused this problem? 
I'm tempted to close this as "Works for me", since I've 
never seen that problem before, and can't imagine what may 
have caused it.

In case you are reading your report once more: It would 
help enormously if you'd leave some contact address for 
questions.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=449991&group_id=5470