On Thursday, January 27, 2011 6:42:29 PM UTC, maki maki wrote:
>
> hi, 
>
>   I execute the command: python manage.py createsuperuser -- 
> username=jack [email protected] 
>
> and an error occurred: 
>
> Traceback (most recent call last): 
>   File "manage.py", line 11, in <module> 
> <snip>
>   File "/usr/lib/python2.6/site-packages/django/db/backends/sqlite3/ 
> base.py", line 200, in execute 
>     return Database.Cursor.execute(self, query, params) 
> django.db.utils.DatabaseError: unable to open database file 
>
>
> the database in settings.py is like this: 
>
> DATABASES = { 
>     'default': { 
>         'ENGINE': 'django.db.backends.sqlite3', # Add 
> 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 
>         'NAME': '/home/jack/django/mysite/data/ 
> db.db',                      # Or path to database file if using 
> sqlite3. 
>         'USER': '',                      # Not used with sqlite3. 
>         'PASSWORD': '',                  # Not used with sqlite3. 
>         'HOST': '',                      # Set to empty string for 
> localhost. Not used with sqlite3. 
>         'PORT': '',                      # Set to empty string for 
> default. Not used with sqlite3. 
>     } 
> } 
>
> can someone tell me why the error occurred? Thanks.


Have you run `manage.py syncdb` first? You need that to create the db and 
the tables.
--
DR. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to