<p><a href="https://code.djangoproject.com/wiki/NewbieMistakes#DjangosaysUnabletoOpenDatabaseFilewhenusingSQLite3" rel="noreferrer">Django NewbieMistakes</a></p>
<blockquote>
<p>PROBLEM You're using SQLite3, your DATABASE_NAME is set to the
database file's full path, the database file is writeable by Apache,
but you still get the above error.</p>
<p>SOLUTION Make sure Apache can also write to the parent directory of
the database. SQLite needs to be able to write to this directory.</p>
<p>Make sure each folder of your database file's full path does not start
with number, eg. /www/4myweb/db (observed on Windows 2000).</p>
<p>If DATABASE_NAME is set to something like
'/Users/yourname/Sites/mydjangoproject/db/db', make sure you've
created the 'db' directory first.</p>
<p>Make sure your /tmp directory is world-writable (an unlikely cause as
other thing on your system will also not work). ls /tmp -ald should
produce drwxrwxrwt ....</p>
<p>Make sure the path to the database specified in settings.py is a full
path.</p>
<p>Also make sure the file is present where you expect it to be.</p>
</blockquote>