newbie: unable to open database file

22 views
Skip to first unread message

ccl4r

unread,
Nov 28, 2009, 10:46:19 PM11/28/09
to Django users
I'm tryin out the tutorial and am very new to this...I have my
settings.py as:

DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2',
'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'C:\Users\Student\Desktop\mysite'

and when I run the command:
python manage.py syncdb

I get a the error:
self.connection = Database.connect(**kwargs)
sqlite3.OparationalError: unable to open database file

I saw related posts but can't find a way to resolve.

Karen Tracey

unread,
Nov 28, 2009, 10:58:05 PM11/28/09
to django...@googlegroups.com
On Sat, Nov 28, 2009 at 10:46 PM, ccl4r <cclus...@gmail.com> wrote:
I'm tryin out the tutorial and am very new to this...I have my
settings.py as:

DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2',
'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'C:\Users\Student\Desktop\mysite'

In Python, backslashes in string literals are escape characters.  You either need to double the backslashes or use forward slashes, which will work fine in path names, even on Windows.

Karen
Reply all
Reply to author
Forward
0 new messages