I know. I thought that this had been patched in web2py, and I was just
wondering the feature got lost in the translation to the new DAL.

--
Thadeus




On Fri, Feb 4, 2011 at 4:16 PM, Kurt Grutzmacher <gr...@jingojango.net>wrote:

> If migrate is True on your Fields then web2py will want to have the
> databases directory existing first as it tries to open databases/
> sql.log first. If this directory doesn't exist then an exception is
> thrown.
>
> web2py$ ls -FC applications/newapp/
> ABOUT                   __init__.py             controllers/
>  languages/              modules/                views/
> LICENSE                 cache/                  cron/
> models/                 static/                 wizard.metadata
> web2py$ python web2py.py -S newapp -M
> web2py Enterprise Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2011
> Version 1.91.6 (2011-02-01 17:13:19)
> Database drivers available: SQLite3, pymysql, PostgreSQL
> Traceback (most recent call last):
>  File "/Users/grutz/src/web2py/gluon/restricted.py", line 188, in
> restricted
>    exec ccode in environment
>  File "applications/newapp/models/db.py", line 80, in <module>
>
> auth.define_tables(migrate=settings.migrate)
> # creates all needed tables
>  File "/Users/grutz/src/web2py/gluon/tools.py", line 1198, in
> define_tables
>    format = '%(role)s (%(id)s)')
>  File "/Users/grutz/src/web2py/gluon/dal.py", line 3490, in
> define_table
>    polymodel=polymodel)
>  File "/Users/grutz/src/web2py/gluon/dal.py", line 522, in
> create_table
>    logfile = self.file_open(table._loggername, 'a')
>  File "/Users/grutz/src/web2py/gluon/dal.py", line 359, in file_open
>    fileobj = open(filename,mode)
> IOError: [Errno 2] No such file or directory: 'applications/newapp/
> databases/sql.log'
>
> web2py$ mkdir applications/newapp/databases
> web2py$ python web2py.py -S newapp -M
> web2py Enterprise Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2011
> Version 1.91.6 (2011-02-01 17:13:19)
> Database drivers available: SQLite3, pymysql, PostgreSQL
> Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.10.1 -- An enhanced Interactive Python.
> ?         -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help      -> Python's own help system.
> object?   -> Details about 'object'. ?object also works, ?? prints
> more.
>
> In [1]:
>

Reply via email to