<class 'sqlalchemy.exc.ProgrammingError'>
Python 2.5.2: /usr/local/bin/python
Wed Jan 7 12:38:43 2009

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 run(self=<flup.server.fcgi_base.Request object at 0x93b706c>)
  556         """Runs the handler, flushes the streams, and ends the request."""
  557         try:
  558             protocolStatus, appStatus = self.server.handler(self)
  559         except:
  560             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object at 0x93b706c>, self.server = <flup.server.fcgi.WSGIServer object at 0x829756c>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object at 0x829756c>>
 /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 0x829756c>, req=<flup.server.fcgi_base.Request object at 0x93b706c>)
 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 0x829756c>, self.application = <__main__.LighttpdFix object at 0x829744c>, environ = {'DOCUMENT_ROOT': '/usr/local/www/rangaku.org', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'Accept: application/xhtml+xml,text/html;q=0.9,text/plain;', '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 0x90ad48c>
 /usr/local/www/rangaku.org/fcgi_frontend.py in __call__(self=<__main__.LighttpdFix object at 0x829744c>, environ={'DOCUMENT_ROOT': '/usr/local/www/rangaku.org', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'Accept: application/xhtml+xml,text/html;q=0.9,text/plain;', '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 0x90ad48c>)
   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 0x829744c>, self.app = <function app at 0x866079c>, environ = {'DOCUMENT_ROOT': '/usr/local/www/rangaku.org', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'Accept: application/xhtml+xml,text/html;q=0.9,text/plain;', '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 0x90ad48c>
 /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': 'Accept: application/xhtml+xml,text/html;q=0.9,text/plain;', '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 0x90ad48c>)
   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 view at 0x89cf80c>, req = <kouyou.application.Request object at 0x90d866c>, values = {'char': u'\u4e14'}
 /usr/local/www/rangaku.org/kouyou/kanji.py in view(request=<kouyou.application.Request object at 0x90d866c>, char=u'\u4e14')
   69     c = schema.engine.connect()
   70     query = select([schema.kanjis], schema.kanjis.c.kanji==char)
   71     result = c.execute(query)
   72     details = result.fetchone()
   73     return TemplatedResponse(template='kanji_view.html', data={
result undefined, c = <sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, c.execute = <bound method Connection.execute of <sqlalchemy.engine.base.Connection object at 0x8b8bd0c>>, query = <sqlalchemy.sql.expression.Select at 0x8b8b4cc; Select object>
 /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc4-py2.5.egg/sqlalchemy/engine/base.py in execute(self=<sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, object=<sqlalchemy.sql.expression.Select at 0x8b8b4cc; Select object>, *multiparams=(), **params={})
  804         for c in type(object).__mro__:
  805             if c in Connection.executors:
  806                 return Connection.executors[c](self, object, multiparams, params)
  807         else:
  808             raise exc.InvalidRequestError("Unexecutable object type: " + str(type(object)))
global Connection = <class 'sqlalchemy.engine.base.Connection'>, Connection.executors = {<type 'basestring'>: <function _execute_text at 0x8827bc4>, <class 'sqlalchemy.sql.expression.ClauseElement'>: <function execute_clauseelement at 0x8827b54>, <class 'sqlalchemy.sql.expression._Function'>: <function _execute_function at 0x8827ae4>, <class 'sqlalchemy.schema.SchemaItem'>: <function _execute_default at 0x8827b1c>, <class 'sqlalchemy.schema.DDL'>: <function _execute_ddl at 0x8827c34>, <class 'sqlalchemy.engine.base.Compiled'>: <function _execute_compiled at 0x8827b8c>}, c = <class 'sqlalchemy.sql.expression.ClauseElement'>, self = <sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, object = <sqlalchemy.sql.expression.Select at 0x8b8b4cc; Select object>, multiparams = (), params = {}
 /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc4-py2.5.egg/sqlalchemy/engine/base.py in execute_clauseelement(self=<sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, elem=<sqlalchemy.sql.expression.Select at 0x8b8b4cc; Select object>, multiparams=(), params=[{}])
  854                         parameters=params
  855                     )
  856         return self.__execute_context(context)
  857 
  858     def _execute_compiled(self, compiled, multiparams=None, params=None):
self = <sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, self.__execute_context undefined, context = <sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x8b8bcec>
 /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc4-py2.5.egg/sqlalchemy/engine/base.py in __execute_context(self=<sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, context=<sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x8b8bcec>)
  876             self._cursor_executemany(context.cursor, context.statement, context.parameters, context=context)
  877         else:
  878             self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context)
  879         if context.compiled:
  880             context.post_exec()
self = <sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, self._cursor_execute = <bound method Connection._cursor_execute of <sqlalchemy.engine.base.Connection object at 0x8b8bd0c>>, context = <sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x8b8bcec>, context.cursor = <sqlalchemy.pool._CursorFairy object at 0x8b8be8c>, context.statement = u'SELECT kanjis.id, kanjis.kanji, kanjis.kanji_typ...s.kuten_code \nFROM kanjis \nWHERE kanjis.kanji = ?', context.parameters = [[u'\u4e14']]
 /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc4-py2.5.egg/sqlalchemy/engine/base.py in _cursor_execute(self=<sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, cursor=<sqlalchemy.pool._CursorFairy object at 0x8b8be8c>, statement=u'SELECT kanjis.id, kanjis.kanji, kanjis.kanji_typ...s.kuten_code \nFROM kanjis \nWHERE kanjis.kanji = ?', parameters=[u'\u4e14'], context=<sqlalchemy.databases.sqlite.SQLiteExecutionContext object at 0x8b8bcec>)
  925             self.dialect.do_execute(cursor, statement, parameters, context=context)
  926         except Exception, e:
  927             self._handle_dbapi_exception(e, statement, parameters, cursor)
  928             raise
  929 
self = <sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, self._handle_dbapi_exception = <bound method Connection._handle_dbapi_exception...hemy.engine.base.Connection object at 0x8b8bd0c>>, e = ProgrammingError('library routine called out of sequence',), statement = u'SELECT kanjis.id, kanjis.kanji, kanjis.kanji_typ...s.kuten_code \nFROM kanjis \nWHERE kanjis.kanji = ?', parameters = [u'\u4e14'], cursor = <sqlalchemy.pool._CursorFairy object at 0x8b8be8c>
 /usr/local/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc4-py2.5.egg/sqlalchemy/engine/base.py in _handle_dbapi_exception(self=<sqlalchemy.engine.base.Connection object at 0x8b8bd0c>, e=ProgrammingError('library routine called out of sequence',), statement=u'SELECT kanjis.id, kanjis.kanji, kanjis.kanji_typ...s.kuten_code \nFROM kanjis \nWHERE kanjis.kanji = ?', parameters=[u'\u4e14'], cursor=<sqlalchemy.pool._CursorFairy object at 0x8b8be8c>)
  907                 if self.__close_with_result:
  908                     self.close()
  909             raise exc.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect)
  910         finally:
  911             del self._reentrant_error
global exc = <module 'sqlalchemy.exc' from '/usr/local/lib/py...QLAlchemy-0.5.0rc4-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 kanjis.id, kanjis.kanji, kanjis.kanji_typ...s.kuten_code \nFROM kanjis \nWHERE kanjis.kanji = ?', parameters = [u'\u4e14'], e = ProgrammingError('library routine called out of sequence',), connection_invalidated undefined, is_disconnect = False

<class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) library routine called out of sequence u'SELECT kanjis.id, kanjis.kanji, kanjis.kanji_type, kanjis.ideographic_description, kanjis.number_of_strokes, kanjis.kangxi_radical, kanjis.unicode_codepoint, kanjis.jisc6226_1978_codepoint, kanjis.jisx0208_1983_codepoint, kanjis.jisx0208_1990_codepoint, kanjis.jisx0208_1997_codepoint, kanjis.jisx0212_1990_codepoint, kanjis.jisx0213_2000_codepoint, kanjis.sjis_codepoint, kanjis.sjis_2004_codepoint, kanjis.euc_jp_codepoint, kanjis.euc_jis_codepoint, kanjis.taught_in, kanjis.learners_kanji_descriptor, kanjis.morohashi_number, kanjis.new_nelson_number, kanjis.variants, kanjis.kyuujitai, kanjis.tags, kanjis.kuten_code \nFROM kanjis \nWHERE kanjis.kanji = ?' [u'\u4e14']
      args = ('(ProgrammingError) library routine called out of sequence',)
      connection_invalidated = False
      instance = <bound method type.instance of <class 'sqlalchemy.exc.ProgrammingError'>>
      message = '(ProgrammingError) library routine called out of sequence'
      orig = ProgrammingError('library routine called out of sequence',)
      params = [u'\u4e14']
      statement = u'SELECT kanjis.id, kanjis.kanji, kanjis.kanji_typ...s.kuten_code \nFROM kanjis \nWHERE kanjis.kanji = ?'