Issue128

Title KeyError w/ bogus journal activation
Priority bug Status unread
Superseder Nosy List leif
Assigned To leif Topics Pyre

Created on 2007-08-21.21:52:22 by leif, last changed 2007-08-21.21:52:22 by leif.

Messages
msg401 (view) Author: leif Date: 2007-08-21.21:52:16
Given the script & .cfg file below, Pyre gets a KeyError which evades the
error-reporting system, leading to a traceback ending in:

  File "/home/leif/dv/pythia/pyre/util/bool.py", line 21, in bool
    return _stringToBool[response.lower()]
KeyError: 'maybe'

I found it difficult to figure out where the bogus value was coming from...

----------snip----------
#!/usr/bin/env python

from pyre.applications.Script import Script

class MyScript(Script):

    name = "myscript"

    class Inventory(Script.Inventory):
        import pyre.inventory as pyre
        answer = pyre.bool("answer")

    def main(self, *args, **kwds):
        self._info.log("the answer is %s" % self.inventory.answer)

if __name__ == "__main__":
    app = MyScript()
    app.run()

# end of file
----------snip----------

[myscript.journal.info]
myscript = maybe
History
Date User Action Args
2007-08-21 21:52:22leifcreate