Traceback (most recent call last):
File "/app/web2py/gluon/restricted.py", line 217, in restricted
exec ccode in environment
File "/app/web2py/applications/CaeSuite/models/db.py", line 16, in <module>
db = get_db(name=None, pool_size=10)
File "/app/web2py/gluon/contrib/heroku.py", line 26, in get_db
current.session.connect(current.request, current.response, db=db)
File "/app/web2py/gluon/globals.py", line 869, in connect
migrate=table_migrate,
File "/app/web2py/gluon/dal.py", line 8223, in define_table
table = self.lazy_define_table(tablename,*fields,**args)
File "/app/web2py/gluon/dal.py", line 8260, in lazy_define_table
polymodel=polymodel)
File "/app/web2py/gluon/dal.py", line 1102, in create_table
query), table)
File "/app/web2py/gluon/dal.py", line 850, in log
logfile = self.file_open(table._loggername, 'a')
File "/app/web2py/gluon/dal.py", line 4578, in file_open
return DatabaseStoredFile(self.db,filename,mode)
File "/app/web2py/gluon/dal.py", line 4506, in __init__
self.db.executesql(sql)
File "/app/web2py/gluon/dal.py", line 8433, in executesql
adapter.execute(query)
File "/app/web2py/gluon/dal.py", line 1969, in execute
return self.log_execute(*a, **b)
File "/app/web2py/gluon/dal.py", line 1963, in log_execute
ret = self.cursor.execute(command, *a[1:], **b)
InternalError: current transaction is aborted, commands ignored until end of transaction block
Variables
| self.cursor.execute | <built-in method execute of psycopg2._psycopg.cursor object> |
|---|---|
| self | <gluon.contrib.heroku.HerokuPostgresAdapter object> |
| self.cursor | <cursor object at 0x287a338; closed: 0> |
| b | {} |
| a | ('CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(255), content TEXT, PRIMARY KEY(path));',) |
| ret | undefined |
| command | 'CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(255), content TEXT, PRIMARY KEY(path));' |
I would really appreciate any help!! Thanks,
Chris2014-03-13T01:37:17.022191+00:00 heroku[web.1]: Starting process with command `python web2py/web2py.py -a '{PASSWORD}' -i 0.0.0.0 -p 35330`
2014-03-13T01:37:20.361879+00:00 app[web.1]: web2py Web Framework
2014-03-13T01:37:20.361879+00:00 app[web.1]: Version 2.9.3-stable+timestamp.2014.03.03.16.38.00
2014-03-13T01:37:20.362162+00:00 app[web.1]: please visit:
2014-03-13T01:37:20.361879+00:00 app[web.1]: Created by Massimo Di Pierro, Copyright 2007-2014
2014-03-13T01:37:20.361879+00:00 app[web.1]: Database drivers available: SQLite(sqlite3), MySQL(pymysql), PostgreSQL(psycopg2), PostgreSQL(pg8000), IMAP(imaplib)
2014-03-13T01:37:20.362162+00:00 app[web.1]: http://127.0.0.1:35330/
2014-03-13T01:37:20.362283+00:00 app[web.1]: use "kill -SIGTERM 2" to shutdown the web2py server
2014-03-13T01:37:20.555609+00:00 heroku[web.1]: State changed from starting to up
2014-03-13T01:43:05.311936+00:00 app[web.1]: Traceback (most recent call last):
2014-03-13T01:43:05.311936+00:00 app[web.1]: if db.executesql(query):
2014-03-13T01:43:05.311936+00:00 app[web.1]: ERROR:web2py.dal:Could not retrieve applications/CaeSuite/databases/9e6a7c1bb77d791a89631de258057aed_web2py_session_CaeSuite.table
2014-03-13T01:43:05.311936+00:00 app[web.1]: File "/app/web2py/gluon/dal.py", line 4560, in exists
2014-03-13T01:43:05.311936+00:00 app[web.1]: File "/app/web2py/gluon/dal.py", line 8433, in executesql
2014-03-13T01:43:05.311936+00:00 app[web.1]: File "/app/web2py/gluon/dal.py", line 1969, in execute
2014-03-13T01:43:05.311936+00:00 app[web.1]: adapter.execute(query)
2014-03-13T01:43:05.311936+00:00 app[web.1]: return self.log_execute(*a, **b)
2014-03-13T01:43:05.312193+00:00 app[web.1]:
2014-03-13T01:43:05.311936+00:00 app[web.1]: File "/app/web2py/gluon/dal.py", line 1963, in log_execute
2014-03-13T01:43:05.312193+00:00 app[web.1]: ^
2014-03-13T01:43:05.312193+00:00 app[web.1]:
2014-03-13T01:43:05.311936+00:00 app[web.1]: ret = self.cursor.execute(command, *a[1:], **b)
2014-03-13T01:43:05.312193+00:00 app[web.1]: ProgrammingError: relation "web2py_filesystem" does not exist
2014-03-13T01:43:05.312193+00:00 app[web.1]: LINE 1: SELECT path FROM web2py_filesystem WHERE path='applications/...
I think I may have made sense of the error above. Based on the code below, DatabaseStoredFile.web2py_filesystem is set to true even if the table creation fails (which it does), as I don't think the error will be caught before it gets to that line. A few lines later, it tries to access that table, causing the error logged by Heroku. Therefore, the key error seems to be that the creation of the web2py_filesystem table is failing.
if not self.web2py_filesystem:
if db._adapter.dbengine == 'mysql':
sql = "CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(255), content LONGTEXT, PRIMARY KEY(path) ) ENGINE=InnoDB;"
elif db._adapter.dbengine in ('postgres', 'sqlite'):
sql = "CREATE TABLE IF NOT EXISTS web2py_filesystem (path VARCHAR(255), content TEXT, PRIMARY KEY(path));"
self.db.executesql(sql)
DatabaseStoredFile.web2py_filesystem = True
2014-08-04T19:12:36.276606+00:00 app[web.1]: File "/app/gluon/dal.py", line 4560, in exists
2014-08-04T19:12:36.276608+00:00 app[web.1]: if db.executesql(query):
2014-08-04T19:12:36.276612+00:00 app[web.1]: File "/app/gluon/dal.py", line 1969, in execute
2014-08-04T19:12:36.276574+00:00 app[web.1]: ERROR:web2py.dal:Could not retrieve applications/jestocke/databases/d3136d7e8c7d9a81c4da148ca6f4d239_web2py_session_jestocke.table
2014-08-04T19:12:36.276616+00:00 app[web.1]: ProgrammingError: relation "web2py_filesystem" does not exist
2014-08-04T19:12:36.276613+00:00 app[web.1]: return self.log_execute(*a, **b)
2014-08-04T19:12:36.276619+00:00 app[web.1]: ^
2014-08-04T19:12:36.276579+00:00 app[web.1]: Traceback (most recent call last):
2014-08-04T19:12:36.276614+00:00 app[web.1]: File "/app/gluon/dal.py", line 1963, in log_execute
2014-08-04T19:12:36.276615+00:00 app[web.1]: ret = self.cursor.execute(command, *a[1:], **b)
2014-08-04T19:12:36.276609+00:00 app[web.1]: File "/app/gluon/dal.py", line 8433, in executesql
2014-08-04T19:12:36.276618+00:00 app[web.1]: LINE 1: SELECT path FROM web2py_filesystem WHERE path='applications/...
2014-08-04T19:12:36.276610+00:00 app[web.1]: adapter.execute(query)
Massimo
...<pre style="padding:5px;font-family:'Bitstream Vera Sans Mono',monospace;font-size:11px;color:rgb(51,51,51);border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;line-height:20px;word-break:normal