When using sqlite3, one has to provide a full path to the database file.
For my projects I use something like this on my development machines (for
a database file named 'db'):
import os
PROJECT_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backen
make sure you don't have another instance of django running already.
-J
On Monday, July 22, 2013 1:48:43 PM UTC-4, Stian Sjøli wrote:
>
> i get this error while going throught the tutorial from the django
> website. I am a mac user, and have modified my settings-file to use sqlite3
> and the na
i get this error while going throught the tutorial from the django website.
I am a mac user, and have modified my settings-file to use sqlite3 and the
name variable to say "./mysite". Any suggestions why I get this error?
--
You received this message because you are subscribed to the Google Gro
the
>> > > "python manage.py syncdb"
>> > > it returns this error:
>>
>> > > Traceback (most recent call last):
>> > > File "manage.py", line 11, in
>> > > execute_manager(settings)
>> > > Fi
ango/core/management/
> > > __init__.py", line 3
> > > utility.execute()
> > > File "/usr/local/lib/python2.6/dist-packages/django/core/management/
> > > __init__.py", line 3
> > > self.fetch_command(subcommand).run_from_argv(self.arg
st-packages/django/core/management/
> > base.py", line 195,
> > self.execute(*args, **options.__dict__)
> > File "/usr/local/lib/python2.6/dist-packages/django/core/management/
> > base.py", line 222,
> > output = self.handle(*args, **options)
> &g
r/local/lib/python2.6/dist-packages/django/core/management/
> commands/syncdb.py",
>cursor = connection.cursor()
> File "/usr/local/lib/python2.6/dist-packages/django/db/backends/
> __init__.py", line 81, i
>cursor = self._cursor()
> File "/usr/local
kages/django/db/backends/
__init__.py", line 81, i
cursor = self._cursor()
File "/usr/local/lib/python2.6/dist-packages/django/db/backends/
sqlite3/base.py", line 1
self.connection = Database.connect(**kwargs)
sqlite3.OperationalError: unable to open database file
i have l
For what it's worth, I found some kind of solution.
Apparently, running under a user administrator account in Windows
causes this kind of permissioning issue. If I enable the windows
hidden administrator and work under that account, this issue
disappears. A bit annoying.
--~--~-~--~~-
Hi, Wim -
Thanks a lot for the reply.
I'm doing everything through code, since accessing the admin interface
is itself plagued with issues. And as far as I can tell, I am the same
user as the owner of the db-file (since I can also change privileges
on the file at will).
These are some more sympt
gt; query.py", line 23
> 69, in execute_sql
> cursor.execute(sql, params)
> File "/usr/lib/python2.5/site-packages/django/db/backends/util.py",
> line 19, i
> n execute
> return self.cursor.execute(sql, params)
> File "/usr/lib/python2.5/site-packages
File "/usr/lib/python2.5/site-packages/django/db/backends/util.py",
line 19, i
n execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.5/site-packages/django/db/backends/sqlite3/
base.py", li
ne 193, in execute
return Database.Cursor.execute(self, quer
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/db/backends/__init__.py", line 33, in
> cursor
> cursor = self._cursor(settings)
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-pa
On 10/21/07, SSK <[EMAIL PROTECTED]> wrote:
> Hmm. Changing ~/... to /Users/Myname/... solved the problem.
Django does not expand shell abbreviations or variables, like "~" or
"$HOME", when opening files.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."
--~--~-
Hmm. Changing ~/... to /Users/Myname/... solved the problem.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscrib
, line 33, in
cursor
cursor = self._cursor(settings)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/db/backends/sqlite3/base.py", line 110,
in _cursor
self.connection = Database.connect(**kwargs)
sqlite3.OperationalError: unable to
16 matches
Mail list logo