3

So I just created a new project and app for the blog. When I try and syncdb it says: "sqlite3.OperationalError: unable to open database file"

I saw the noob FAQ and it says the possible errors are having an incorrect path or not giving apache permission to write to the folder.

Here is a dpaste with my settings.py and some terminal outputs to give you an idea of what's up.

http://dpaste.org/eQUm/

If the solution is to give apache permission to write, how would i do it? I am running the server on a personal computer on ubuntu.

1

1 Answer 1

4

You need to give the path to the database file, look at your database settings:

'NAME': '/home/vmplanet/code/blog', # Or path to database file if using sqlite3.

...which is presumably the project directory. Try /home/vmplanet/code/blog/blog.db.

Sign up to request clarification or add additional context in comments.

1 Comment

Also note that django won't accept '~/code/blog/blog.db', you need to pass the full path. I was having this problem and saw the exact same error message.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.