To me it looks like you do not have the folder /home/www-data/web2py/applications/app/databases
of you do not have the right permissions on the folder On Saturday, 20 October 2012 10:53:46 UTC-5, lyn2py wrote: > > Thanks Massimo, I have looked at the error log files (production site), > and found this traceback: > > __db_meta_setup: > /home/www-data/web2py/applications/app/cache/cache.shelve.db: unexpected > file type or format > ERROR:web2py:Traceback (most recent call last): > File "/home/www-data/web2py/gluon/restricted.py", line 209, in restricted > exec ccode in environment > File "applications/myapp/compiled/models/db2.py", line 36, in <module> > File "/home/www-data/web2py/gluon/tools.py", line 1497, in define_tables > format='%(first_name)s %(last_name)s (%(id)s)')) > File "/home/www-data/web2py/gluon/dal.py", line 7095, in define_table > table = self.lazy_define_table(tablename,*fields,**args) > File "/home/www-data/web2py/gluon/dal.py", line 7126, in > lazy_define_table > polymodel=polymodel) > File "/home/www-data/web2py/gluon/dal.py", line 896, in create_table > logfile = self.file_open(table._loggername, 'a') > File "/home/www-data/web2py/gluon/dal.py", line 646, in file_open > fileobj = portalocker.LockedFile(filename,mode) > File "/home/www-data/web2py/gluon/portalocker.py", line 121, in __init__ > self.file = open(filename,mode.replace('w','a')) > IOError: [Errno 2] No such file or directory: > '/home/www-data/web2py/applications/app/databases/sql.log' > > Hope it helps! > > > On Saturday, October 20, 2012 8:21:10 PM UTC+8, Massimo Di Pierro wrote: >> >> When you get an unkown error there is a traceback in the console or >> apache logs. Can I see the traceback? >> >> On Saturday, 20 October 2012 04:04:22 UTC-5, lyn2py wrote: >>> >>> I performed as Massimo's suggestion, >>> fake_migrate_all=True,migrate_enabled=True >>> >>> But I ran into an Internal Error: Unknown. (no ticket). >>> >>> >>> >>> On Thursday, October 18, 2012 8:17:23 PM UTC+8, Massimo Di Pierro wrote: >>>> >>>> You mean you do not see the .table files? >>>> >>>> Try: >>>> fake_migrate_all=True,migrate_enabled=True >>>> could be an error in the book. >>>> >>>> On Thursday, 18 October 2012 01:29:42 UTC-5, lyn2py wrote: >>>>> >>>>> Hello all, something went wrong with the database table files, and >>>>> they were accidentally completely removed (the whole database folder). >>>>> >>>>> I need to rebuild all the database files, so I did: >>>>> db = DAL('postgres://........',fake_migrate_all=True,migrate_enabled= >>>>> False) >>>>> >>>>> According to the manual, this is supposed to rebuild the database >>>>> table files, but I still don't see the database folder appearing in the >>>>> app's folder. >>>>> >>>>> May I know what I should do to fix migrations? >>>>> >>>>> Thank you! >>>>> >>>> --