Django beginner problem: dbsync


I'm running ubuntu 9.04 32b and got django from Synaptics.
My is configured for a sqlite3 database.

I've been through this tutorial and got the following error when trying to run the command python syncdb :

Traceback (most recent call last):
  File "", line 11, in 
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/", line 340, in execute_manager
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/", line 295, in execute
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/", line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/", line 219, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/", line 348, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/commands/", line 51, in handle_noargs
    cursor = connection.cursor()
  File "/usr/local/lib/python2.6/dist-packages/django/db/backends/", line 56, in cursor
    cursor = self._cursor(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/db/backends/sqlite3/", line 145, in _cursor
    self.connection = Database.connect(**kwargs)
sqlite3.OperationalError: unable to open database file

Do anyone have a clue on my problem ?

Best Solution

In are you using a relative path to the sqlite file?

If you are, try changing that to an absolute path.

i.e. instead of:



Related Question