When creating an application in console mode, the databases folder should be created?

11 views
Skip to first unread message

Bruno Rocha

unread,
Aug 12, 2010, 9:38:12 PM8/12/10
to web...@googlegroups.com
Hi,

I were playing with Shell mode, to explain some DAL features in a class,
I did:

<code>
 ~/web2py$ python web2py.py -S test -P
..........
application teste does not exist, create (y/n)?y
</code>

OK, web2py creates an app named "test"

So I tried:
<code>
>>> from gluon import *
>>> base = DAL('sqlite://mybase.db')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/bruno/web2py/gluon/sql.py", line 3990, in DAL
    raise RuntimeError, "%s (tried 5 times)" % exception
RuntimeError: unable to open database file (tried 5 times)
</code>

I realize that web2py does not create the "databases" folder for the "test" app,
Then I created manually that folder "mkdir databases", and everything works well.

Why web2py does not create that folder?

tks




--

http://rochacbruno.com.br

mr.freeze

unread,
Aug 12, 2010, 11:47:16 PM8/12/10
to web2py-users
'python web2py.py -S test -P' works for me and creates a databases
folder. Perhaps it's a permissions issue with ~/web2py?

Bruno Rocha

unread,
Aug 13, 2010, 12:17:38 AM8/13/10
to web...@googlegroups.com
My version is 1.83.1 (stable) on Ubuntu 10.04, yours?

2010/8/13 mr.freeze <nat...@freezable.com>



--

http://rochacbruno.com.br

mdipierro

unread,
Aug 13, 2010, 3:13:21 AM8/13/10
to web2py-users
because you used hg to deploy and hg does not version control empty
folder. I just fixed it in trunk by adding an empty file in there.

On Aug 12, 8:38 pm, Bruno Rocha <rochacbr...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages