need some help in reading error message

A

Allerdyce.John

I need some help in reading error message: which line has problem? line
233? or line 37?

Thank you.

$ ./read2.py log.xml
Traceback (most recent call last):
File "./read2.py", line 233, in ?
parser.parse(open(inputFileName))
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 109, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py",
line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 216, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 311, in start_element
self._cont_handler.startElement(name, AttributesImpl(attrs))
File "./read2.py", line 37, in startElement
openTable(self, "BlockGrouperExecuter input", self.type)
AttributeError: LogHandler instance has no attribute 'type'
 
A

Alex Martelli

I need some help in reading error message: which line has problem? line
233? or line 37?

Thank you.

$ ./read2.py log.xml
Traceback (most recent call last):
File "./read2.py", line 233, in ?
parser.parse(open(inputFileName))
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 109, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py",
line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 216, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py",
line 311, in start_element
self._cont_handler.startElement(name, AttributesImpl(attrs))
File "./read2.py", line 37, in startElement
openTable(self, "BlockGrouperExecuter input", self.type)
AttributeError: LogHandler instance has no attribute 'type'

Line 37: specifically, self is an instance of LogHandler, and it does
not have any attribute named "type".


Alex
 
D

Dennis Lee Bieber

I need some help in reading error message: which line has problem? line
233? or line 37?
Off hand, neither is the problem. Line 37 is where the problem was
DETECTED. The object that is being referred to as "self" on that line
contains the problem -- it is apparently an instance of a "LogHandler",
but that instance does not have anything called ".type" to pass to the
openTable call.

Show us the contents of "read2.py" and better details may be
forthcoming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top