KeyError | Python 2.4.3: /usr/bin/python Sat Jun 4 18:21:17 2011 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/web/script/jcgregorio/wellformedweb.org/Bulu.cgi |
12 |
13 import BuluCfg |
14 import BuluImpl |
15 |
16 BuluImpl.BuluMain() |
BuluImpl = <module 'BuluImpl' from '/web/script/jcgregorio/wellformedweb.org/BuluImpl.py'>, BuluImpl.BuluMain = <function BuluMain> |
/web/script/jcgregorio/wellformedweb.org/BuluImpl.py in BuluMain() |
420 mime_type = detMimeType() |
421 |
422 if False == dispatcher.dispatch(os.environ.get('REQUEST_METHOD', 'GET'), mime_type): |
423 dispatch.fileNotFound() |
424 |
builtin False = False, dispatcher = <BuluImpl.ItemDispatch instance>, dispatcher.dispatch = <bound method ItemDispatch.dispatch of <BuluImpl.ItemDispatch instance>>, global os = <module 'os' from '/usr/lib64/python2.4/os.pyc'>, os.environ = {'REDIRECT_UNIQUE_ID': 'Teqv3TIcDuIAAEcnU9sAAAAC...'46143', 'UNIQUE_ID': 'Teqv3TIcDuIAAEcnU9sAAAAC'}, os.environ.get = <bound method _Environ.get of {'REDIRECT_UNIQUE_...46143', 'UNIQUE_ID': 'Teqv3TIcDuIAAEcnU9sAAAAC'}>, mime_type = 'html' |
/web/script/jcgregorio/wellformedweb.org/dispatch.py in dispatch(self=<BuluImpl.ItemDispatch instance>, verb='GET', mime_type='html') |
54 fun_name = verb + "_" + mime_type |
55 if fun_name in dir(self) and callable(getattr(self, fun_name)): |
56 getattr(self, fun_name)() |
57 returnValue = True |
58 elif verb in dir(self) and callable(getattr(self, verb)): |
builtin getattr = <built-in function getattr>, self = <BuluImpl.ItemDispatch instance>, fun_name = 'GET_html' |
/web/script/jcgregorio/wellformedweb.org/BuluImpl.py in GET_html(self=<BuluImpl.ItemDispatch instance>) |
279 if os.access(filename, os.F_OK): |
280 print "Content-type: text/html\n" |
281 templating.transformItemsUsingTemplate(config().template_filename('main_html'), [self.id, ], config.data_dir, sys.stdout, 1, config.__dict__) |
282 else: |
283 dispatch.fileNotFound() |
global templating = <module 'templating' from '/web/script/jcgregorio/wellformedweb.org/templating.py'>, templating.transformItemsUsingTemplate = <function transformItemsUsingTemplate>, global config = <class BuluCfg.config>, ).template_filename = <unbound method config.template_filename>, self = <BuluImpl.ItemDispatch instance>, self.id = 'wfw_namespace_elements', config.data_dir = '/home/jcgregorio/web/wellformedweb.org/data/', global sys = <module 'sys' (built-in)>, sys.stdout = <open file '<stdout>', mode 'w'>, config.__dict__ = {'__doc__': None, '__module__': 'BuluCfg', 'abs_base_uri': 'http://wellformedweb.org/', 'author': 'BitWorking, Inc', 'base_dir': '/home/jcgregorio/web/wellformedweb.org/', 'base_uri': 'http://wellformedweb.org/news/', 'comment_uri': 'http://wellformedweb.org/news/comments/', 'comments': 1, 'data_dir': '/home/jcgregorio/web/wellformedweb.org/data/', 'description': 'Exploring the limits of XML and HTTP', ...} |
/web/script/jcgregorio/wellformedweb.org/templating.py in transformItemsUsingTemplate(templateFileName='/home/jcgregorio/web/wellformedweb.org/templates/html.tmpl', itemIDs=['wfw_namespace_elements'], dataDir='/home/jcgregorio/web/wellformedweb.org/data/', output=<open file '<stdout>', mode 'w'>, includeComments=1, config={'__doc__': None, '__module__': 'BuluCfg', 'abs_base_uri': 'http://wellformedweb.org/', 'author': 'BitWorking, Inc', 'base_dir': '/home/jcgregorio/web/wellformedweb.org/', 'base_uri': 'http://wellformedweb.org/news/', 'comment_uri': 'http://wellformedweb.org/news/comments/', 'comments': 1, 'data_dir': '/home/jcgregorio/web/wellformedweb.org/data/', 'description': 'Exploring the limits of XML and HTTP', ...}) |
61 Items = [] |
62 for id in itemIDs: |
63 Items.append(fileToDict(dataDir, str(id))) |
64 if includeComments: |
65 Items[-1]['comments'] = getCommentList(dataDir, dir, id) |
Items = [], Items.append = <built-in method append of list object>, global fileToDict = <function fileToDict>, dataDir = '/home/jcgregorio/web/wellformedweb.org/data/', builtin str = <type 'str'>, id = 'wfw_namespace_elements' |
/web/script/jcgregorio/wellformedweb.org/templating.py in fileToDict(dataDir='/home/jcgregorio/web/wellformedweb.org/data/', fileName='wfw_namespace_elements') |
72 def fileToDict(dataDir, fileName): |
73 fullFileName = os.path.join(dataDir, fileName) |
74 dict = convertNodesToDict(fullFileName, 'item', BuluCfg.config.nsDecl, "_") |
75 f = file(fullFileName, "r") |
76 dict['content'] = f.read() |
builtin dict = <type 'dict'>, global convertNodesToDict = <function convertNodesToDict>, fullFileName = '/home/jcgregorio/web/wellformedweb.org/data/wfw_namespace_elements', global BuluCfg = <module 'BuluCfg' from '/web/script/jcgregorio/wellformedweb.org/BuluCfg.py'>, BuluCfg.config = <class BuluCfg.config>, BuluCfg.config.nsDecl = {'http://purl.org/dc/elements/1.1/': 'dc', 'http://wellformedweb.org/CommentAPI/': 'wfw', 'http://www.purl.org/RESTLog/': 'rl'} |
/web/script/jcgregorio/wellformedweb.org/XmlToDict.py in convertNodesToDict(file='/home/jcgregorio/web/wellformedweb.org/data/wfw_namespace_elements', parentElementName='item', knownNamespaces={'http://purl.org/dc/elements/1.1/': 'dc', 'http://wellformedweb.org/CommentAPI/': 'wfw', 'http://www.purl.org/RESTLog/': 'rl'}, separator='_') |
42 |
43 file - The source of the XML can be either a file name or a file stream.""" |
44 parser = xml.sax.make_parser() |
45 parser.setFeature(xml.sax.handler.feature_namespaces, 1) |
46 h = handler(parentElementName, knownNamespaces, separator) |
parser undefined, global xml = <module '_xmlplus' from '/home/jcgregorio/lib/python2.2/site-packages/_xmlplus/__init__.py'>, xml.sax = <module 'xml.sax' from '/home/jcgregorio/lib/python2.2/site-packages/_xmlplus/sax/__init__.py'>, xml.sax.make_parser = <function make_parser> |
/home/jcgregorio/lib/python2.2/site-packages/_xmlplus/sax/sax2exts.py in make_parser(parser_list=[]) |
33 SGMLParserFactory=XMLReaderFactory(["xml.sax.drivers2.drv_sgmlop", |
34 "xml.sax.drivers2.drv_sgmllib"]) |
35 |
36 def make_parser(parser_list = []): |
37 return XMLParserFactory.make_parser(parser_list) |
global XMLParserFactory = <xml.sax.saxexts.ParserFactory instance>, XMLParserFactory.make_parser = <bound method ParserFactory.make_parser of <xml.sax.saxexts.ParserFactory instance>>, parser_list = [] |
/home/jcgregorio/lib/python2.2/site-packages/_xmlplus/sax/saxexts.py in make_parser(self=<xml.sax.saxexts.ParserFactory instance>, parser_list=[]) |
73 def _create_parser(msg = str(e)): |
74 raise _exceptions.SAXReaderNotAvailable(msg) |
75 sys.modules[parser_name].create_parser = _create_parser |
76 |
77 raise _exceptions.SAXReaderNotAvailable("No parsers found", None) |
sys = <module 'sys' (built-in)>, sys.modules = {'BuluCfg': <module 'BuluCfg' from '/web/script/jcgregorio/wellformedweb.org/BuluCfg.py'>, 'BuluImpl': <module 'BuluImpl' from '/web/script/jcgregorio/wellformedweb.org/BuluImpl.py'>, 'Cheetah': <module 'Cheetah' from '/home/jcgregorio/lib/python2.2/Cheetah/__init__.py'>, 'Cheetah.Cheetah': None, 'Cheetah.ConfigParser': None, 'Cheetah.DummyTransaction': <module 'Cheetah.DummyTransaction' from '/home/j...gorio/lib/python2.2/Cheetah/DummyTransaction.py'>, 'Cheetah.ErrorCatchers': <module 'Cheetah.ErrorCatchers' from '/home/jcgregorio/lib/python2.2/Cheetah/ErrorCatchers.py'>, 'Cheetah.Filters': <module 'Cheetah.Filters' from '/home/jcgregorio/lib/python2.2/Cheetah/Filters.py'>, 'Cheetah.NameMapper': <module 'Cheetah.NameMapper' from '/home/jcgregorio/lib/python2.2/Cheetah/NameMapper.py'>, 'Cheetah.Servlet': <module 'Cheetah.Servlet' from '/home/jcgregorio/lib/python2.2/Cheetah/Servlet.py'>, ...}, parser_name = 'xml.sax.drivers2.drv_pyexpat', ].create_parser undefined, _create_parser = <function _create_parser> |
KeyError: 'xml.sax.drivers2.drv_pyexpat'
args =
('xml.sax.drivers2.drv_pyexpat',)