Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4 Paida reading jaida file

something_wrong
closed-accepted
Core (7)
5
2006-10-15
2006-10-09
Jan Strube
No

I can't read the attached file, which was created by
jaida, in paida.

The traceback is:

/home/jstrube/lib/python/paida/paida_core/ITreeFactory.py
in create(self, data1, data2, data3, data4, data5)
68
storeFile.write(_initialXml)
69
storeFile.close()
70 else:
71 raise
IOException('%s does not exist.' % storeName)
---> 72 return ITree(storeName,
storeType, readOnly, option)

/home/jstrube/lib/python/paida/paida_core/ITree.py in
__init__(self, fileName, storeType, readOnly, options)
2091
parser.setEntityResolver(_handler_EntityResolver())
2092 try:
-> 2093
parser.parse(fileObj)
2094 except
xml.sax._exceptions.SAXParseException:
2095 errorMessage =
'The file "%s" is broken. Stopped reading.' % fileName

/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py
in parse(self, source)
107
self._cont_handler.setDocumentLocator(ExpatLocator(self))
108 try:
--> 109
xmlreader.IncrementalParser.parse(self, source)
110 finally:
111 # Drop reference to Expat parser,
but read potential

/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py
in parse(self, source)
121 buffer = file.read(self._bufsize)
122 while buffer != "":
--> 123 self.feed(buffer)
124 buffer = file.read(self._bufsize)
125 self.close()

/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py
in feed(self, data, isFinal)
214 # document. When feeding chunks,
they are not normally final -
215 # except when invoked from close.
--> 216 self._parser.Parse(data, isFinal)
217 except expat.error, e:
218 exc =
SAXParseException(expat.ErrorString(e.code), e, self)

/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py
in start_element(self, name, attrs)
310 # event handlers
311 def start_element(self, name, attrs):
--> 312 self._cont_handler.startElement(name,
AttributesImpl(attrs))
313
314 def end_element(self, name):

/home/jstrube/lib/python/paida/paida_core/ITree.py in
startElement(self, name, attributes)
433 self.bin1d =
_handler_bin1d_histogram1d(self)
434 self.setHandler(self.bin1d)
--> 435
self.bin1d.startElement(name, attributes)
436
437 def endElement(self, name):

/home/jstrube/lib/python/paida/paida_core/ITree.py in
startElement(self, name, attributes)
445 ### Pick up.
446 try:
--> 447 height =
float(attributes['height'])
448 except ValueError:
449 height =
self.evaluator(attributes['height'])

/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py
in __getitem__(self, name)
314
315 def __getitem__(self, name):
--> 316 return self._attrs[name]
317
318 def keys(self):

KeyError: 'height'

Discussion

  • Jan Strube
    Jan Strube
    2006-10-09

     
  • Koji Kishimoto
    Koji Kishimoto
    2006-10-13

    • milestone: --> something_wrong
    • assigned_to: nobody --> korry
    • labels: --> Core
    • status: open --> closed-fixed
     
  • Koji Kishimoto
    Koji Kishimoto
    2006-10-13

    Logged In: YES
    user_id=734761

    Thanks for the report.
    Fixed in the next coming 3.2.1_2.10 release.

     
  • Jan Strube
    Jan Strube
    2006-10-13

    Logged In: YES
    user_id=1366327

    Great !
    Thanks, Koji.

    Could you provide some details about the bug ? There also
    seems to be a problem the other way around, as I seem to not
    be able to plot some histograms in a paida file in JAS3.
    Plotting that file in PAIDA is no problem, however.
    I'll contact the JAS developers about it, but maybe it's
    related to this bug.

    Cheers,
    Jan

     
  • Koji Kishimoto
    Koji Kishimoto
    2006-10-14

    • status: closed-fixed --> open-accepted
     
  • Koji Kishimoto
    Koji Kishimoto
    2006-10-14

    Logged In: YES
    user_id=734761

    The problem was that PAIDA always needed the attributes of
    "height" and "error" in XML data file.
    They might be omitted by some implementations and should be
    derived from bin entries. PAIDA didn't know it.

    But I cannot immediately determine the reason why JAS3
    doesn't plot PAIDA file correctly... If there is no problem,
    would you send me a sample data file or script?

     
  • Jan Strube
    Jan Strube
    2006-10-15

    Logged In: YES
    user_id=1366327

    I think the Jas3 problem solved itself. I saw that a couple
    of histograms showed 0 entries in JAS, but it turns out that
    it was correct and I had just made a mistake in filling them.
    Thanks.

     
  • Koji Kishimoto
    Koji Kishimoto
    2006-10-15

    • status: open-accepted --> closed-accepted
     
  • Koji Kishimoto
    Koji Kishimoto
    2006-10-15

    Logged In: YES
    user_id=734761

    That's good. Then I'll close this topic.

    P.S.
    CVS tree is already updated including this bug fix.