RuntimeError: table appears corrupted

1,021 views
Skip to first unread message

Richard Penman

unread,
Dec 28, 2012, 11:33:11 PM12/28/12
to web...@googlegroups.com
I have had an app running for a few months and recently could not connect to (nginx) server. Then after restart got this error:
RuntimeError: table appears corrupted

If I add migrate=False,fake_migrate=True to DAL then app works. But when remove this error returns. 
Any idea what is going wrong?

Massimo Di Pierro

unread,
Dec 28, 2012, 11:48:09 PM12/28/12
to web...@googlegroups.com
Try 

migrate=True, fake_migrate=True 

than (after it works)

migrate=False,fake_migrate=False

or (if you plan to change your tables)

migrate=Migrate,fake_migrate=False

and you should be fine.

Richard Baron Penman

unread,
Dec 29, 2012, 12:43:49 AM12/29/12
to web...@googlegroups.com
> migrate=True, fake_migrate=True

strangely that produces the same table corrupted error

Richard Baron Penman

unread,
Dec 29, 2012, 12:48:51 AM12/29/12
to web...@googlegroups.com
These work:
DAL(uri, migrate=False, fake_migrate=False)
DAL(uri, migrate=False, fake_migrate=True)

These produce Runtime error:
DAL(uri, migrate=True, fake_migrate=False)
DAL(uri, migrate=True, fake_migrate=True)

Massimo Di Pierro

unread,
Dec 29, 2012, 2:32:38 AM12/29/12
to web...@googlegroups.com
Can you try delete (backup first) all yourapp/database/*.table then try again.

Richard Baron Penman

unread,
Dec 29, 2012, 2:51:42 AM12/29/12
to web...@googlegroups.com
Thanks - that did it.

Any idea what happened and how to prevent this?
If helpful I can send the previous and current .table files.
> --
>
>
>

Massimo Di Pierro

unread,
Dec 29, 2012, 11:39:07 AM12/29/12
to web...@googlegroups.com
Please send them to me and your model as well. Thanks.

Tomek Krasuski

unread,
Jul 11, 2013, 7:23:18 AM7/11/13
to web...@googlegroups.com
THX.

James O' Driscoll

unread,
Mar 31, 2015, 6:27:11 PM3/31/15
to web...@googlegroups.com
I had the same problem today.

Had server running for less than a month, the table was from SQLITE.

I am looking for preventative measures rather than reactionary.

Regards,
James 

Maurice Waka

unread,
Sep 27, 2016, 12:45:30 AM9/27/16
to web2py-users
Good morning all.
I came across this post when searching for an answer. I got this error from my app::

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
Traceback (most recent call last):
File "C:\Python27\web2py\gluon\restricted.py", line 227, in restricted
exec ccode in environment
File "C:/Python27/web2py/applications/hestQue/models/db2.py", line 33, in <module>
auth.signature)
File "C:\Python27\web2py\gluon\packages\dal\pydal\base.py", line 834, in define_table
table = self.lazy_define_table(tablename,*fields,**args)
File "C:\Python27\web2py\gluon\packages\dal\pydal\base.py", line 873, in lazy_define_table
polymodel=polymodel)
File "C:\Python27\web2py\gluon\packages\dal\pydal\adapters\base.py", line 503, in create_table
raise RuntimeError('File %s appears corrupted' % table._dbt)
RuntimeError: File C:\Python27\web2py\applications\hestQue\databases\c8b669d15150d7109e5f7ab36744a5b7_comm.table appears corrupted


Any reason why this happened and how I can sort it out??
Kind reagrds

James O' Driscoll

unread,
Oct 11, 2016, 9:55:46 PM10/11/16
to web...@googlegroups.com
I never figured out why this happened but I moved away from SQLite after this happened.

I have not seen this error from postgres.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/9ArQ4jIesOk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Morganti

unread,
Dec 28, 2017, 3:36:20 PM12/28/17
to web2py-users
Hi,
I had these error now and I was not changing anything in scheme models. I just changed the logo file in models/menu.py.
Is there any idea the reason of it?

Thanks
BR
André
Reply all
Reply to author
Forward
0 new messages