Postgres: No databases/*.table files created

49 views
Skip to first unread message

Matt Norris

unread,
Oct 8, 2015, 6:29:42 PM10/8/15
to web2py-users
I am using Postgres and my tables are created fine when I first hit my application. However, on the next hit, I get the following error: 

<type 'exceptions.RuntimeError'> File applications/APPNAME/databases/715f66f7f718f8a2afa073dfc0be5874_web2py_session_APPNAME.table appears corrupted


I get this error because no files have been created in the `databases` folder.

Migrations are on, and I realize that if I turn them off and hit the application this error goes away, but it seems like I shouldn't have to do that. 

Why aren't the .table files created? 

Thanks, 
Matt 

Niphlod

unread,
Oct 9, 2015, 2:18:39 AM10/9/15
to web2py-users
"file blablabla appears corrupted" kinda points out that a file is there .......

Anthony

unread,
Oct 9, 2015, 7:50:18 AM10/9/15
to web2py-users
Looks like that is coming from here, https://github.com/web2py/pydal/blob/master/pydal/adapters/base.py#L497, which indicates a file is being found. Are you sure there's nothing there? If it is there, is it an empty file? Can you unpickle it yourself?

I've read that you can also get this error if the file is open for write by another process or if you run out of RAM.

Anthony

Matt Norris

unread,
Oct 13, 2015, 8:03:53 AM10/13/15
to web2py-users
Thank you for giving me a few more clues. I tried running the application with a remote DB, a local DB, and fiddled with configuration options, but I'm still not able to pinpoint the file. If I run SQLite, files are generated in the `databases` folder. If I connect to a database, they are not. However, errors appear in the proper directory. 

I am running the `python web2py.py` through Heroku's Procfile, which I thought might be the problem. However, after running the application with no Heroku-specific commands, I see the same thing. 
Reply all
Reply to author
Forward
0 new messages