KriRad
unread,Apr 6, 2012, 1:25:28 AM4/6/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi,
I have read previous mail in many forums and tried the suggestions.
The error is "pysqlite2.dbapi2.OperationalError: unable to open
database file"
Read/Write permissions are given
Command run is
sudo /usr/bin/python manage.py syncdb
settings.py is
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqllite3', # Add
'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '/home/admin/django/db/nio.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.
I have 3 settings.py files
/usr/lib/pymodules/python2.7/django/conf/project_template/
settings.py:DATABASES = {
/usr/lib/pymodules/python2.6/django/conf/project_template/
settings.py:DATABASES = {
/usr/share/pyshared/django/conf/project_template/settings.py:DATABASES
= {
Some more information. I am not using python2.6 because when I type
'python' I get the following prompt.
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
I have updated both the following files.
/usr/lib/pymodules/python2.7/django/conf/project_template/settings.py
/usr/share/pyshared/django/conf/project_template/settings.py
Thanks,
Mohan