A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
| /usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object at 0x827658c>, req=<flup.server.fcgi_base.Request object at 0x8eb46cc>) |
1114 try:
|
1115 try:
|
1116 result = self.application(environ, start_response)
|
1117 try:
|
1118 for data in result:
|
| result = None, self = <flup.server.fcgi.WSGIServer object at 0x827658c>, self.application = <__main__.LighttpdFix object at 0x827646c>, environ = {'DOCUMENT_ROOT': '/usr/local/www/rangaku.org', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.rangaku.org', 'HTTP_PRAGMA': 'no-cache', ...}, start_response = <function start_response at 0x8eb0dbc> |
| /usr/local/www/rangaku.org/fcgi_frontend.py in __call__(self=<__main__.LighttpdFix object at 0x827646c>, environ={'DOCUMENT_ROOT': '/usr/local/www/rangaku.org', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.rangaku.org', 'HTTP_PRAGMA': 'no-cache', ...}, start_response=<function start_response at 0x8eb0dbc>) |
19 environ.get('PATH_INFO', '')
|
20 environ['SCRIPT_NAME'] = ''
|
21 return self.app(environ, start_response)
|
22
|
23 if __name__ == '__main__':
|
| self = <__main__.LighttpdFix object at 0x827646c>, self.app = <function app at 0x8656c6c>, environ = {'DOCUMENT_ROOT': '/usr/local/www/rangaku.org', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.rangaku.org', 'HTTP_PRAGMA': 'no-cache', ...}, start_response = <function start_response at 0x8eb0dbc> |
| /usr/local/www/rangaku.org/kouyou/application.py in app(environ={'DOCUMENT_ROOT': '/usr/local/www/rangaku.org', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.rangaku.org', 'HTTP_PRAGMA': 'no-cache', ...}, start_reponse=<function start_response at 0x8eb0dbc>) |
63 endpoint, values = url_adapter.match()
|
64 view = import_string('kouyou.' + endpoint)
|
65 resp = view(req, **values)
|
66 except (HTTPException, RequestRedirect), e:
|
67 resp = e
|
| resp undefined, view = <function browse_index at 0x8dfa7d4>, req = <kouyou.application.Request object at 0x971076c>, values = {} |
| /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py in execute(self=<sqlalchemy.engine.base.Connection object at 0x97102ec>, object=<sqlalchemy.sql.expression.Select at 0x97101ac; Select object>, *multiparams=(), **params={}) |
822 for c in type(object).__mro__:
|
823 if c in Connection.executors:
|
824 return Connection.executors[c](self, object, multiparams, params)
|
825 else:
|
826 raise exc.InvalidRequestError("Unexecutable object type: " + str(type(object)))
|
| global Connection = <class 'sqlalchemy.engine.base.Connection'>, Connection.executors = {<type 'basestring'>: <function _execute_text at 0x883aed4>, <class 'sqlalchemy.sql.expression.ClauseElement'>: <function _execute_clauseelement at 0x883ae64>, <class 'sqlalchemy.sql.expression.Function'>: <function _execute_function at 0x883adf4>, <class 'sqlalchemy.schema.SchemaItem'>: <function _execute_default at 0x883ae2c>, <class 'sqlalchemy.schema.DDL'>: <function _execute_ddl at 0x883af44>, <class 'sqlalchemy.engine.base.Compiled'>: <function _execute_compiled at 0x883ae9c>}, c = <class 'sqlalchemy.sql.expression.ClauseElement'>, self = <sqlalchemy.engine.base.Connection object at 0x97102ec>, object = <sqlalchemy.sql.expression.Select at 0x97101ac; Select object>, multiparams = (), params = {} |
| /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py in __execute_context(self=<sqlalchemy.engine.base.Connection object at 0x97102ec>, context=<sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x9710dac>) |
894 self._cursor_executemany(context.cursor, context.statement, context.parameters, context=context)
|
895 else:
|
896 self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context)
|
897 if context.compiled:
|
898 context.post_exec()
|
| self = <sqlalchemy.engine.base.Connection object at 0x97102ec>, self._cursor_execute = <bound method Connection._cursor_execute of <sqlalchemy.engine.base.Connection object at 0x97102ec>>, context = <sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x9710dac>, context.cursor = <sqlalchemy.pool._CursorFairy object at 0x9710bec>, context.statement = u'SELECT count(entries.headword) AS count_1 \nFROM entries', context.parameters = [[]] |
| /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py in _cursor_execute(self=<sqlalchemy.engine.base.Connection object at 0x97102ec>, cursor=<sqlalchemy.pool._CursorFairy object at 0x9710bec>, statement=u'SELECT count(entries.headword) AS count_1 \nFROM entries', parameters=[], context=<sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x9710dac>) |
948 self.dialect.do_execute(cursor, statement, parameters, context=context)
|
949 except Exception, e:
|
950 self._handle_dbapi_exception(e, statement, parameters, cursor, context)
|
951 raise
|
952
|
| self = <sqlalchemy.engine.base.Connection object at 0x97102ec>, self._handle_dbapi_exception = <bound method Connection._handle_dbapi_exception...hemy.engine.base.Connection object at 0x97102ec>>, e = ProgrammingError('library routine called out of sequence',), statement = u'SELECT count(entries.headword) AS count_1 \nFROM entries', parameters = [], cursor = <sqlalchemy.pool._CursorFairy object at 0x9710bec>, context = <sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x9710dac> |
| /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py in _handle_dbapi_exception(self=<sqlalchemy.engine.base.Connection object at 0x97102ec>, e=ProgrammingError('library routine called out of sequence',), statement=u'SELECT count(entries.headword) AS count_1 \nFROM entries', parameters=[], cursor=<sqlalchemy.pool._CursorFairy object at 0x9710bec>, context=<sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x9710dac>) |
929 if self.__close_with_result:
|
930 self.close()
|
931 raise exc.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect)
|
932 finally:
|
933 del self._reentrant_error
|
| global exc = <module 'sqlalchemy.exc' from '/usr/local/lib/py...s/SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/exc.pyc'>, exc.DBAPIError = <class 'sqlalchemy.exc.DBAPIError'>, exc.DBAPIError.instance = <bound method type.instance of <class 'sqlalchemy.exc.DBAPIError'>>, statement = u'SELECT count(entries.headword) AS count_1 \nFROM entries', parameters = [], e = ProgrammingError('library routine called out of sequence',), connection_invalidated undefined, is_disconnect = False |