I am new to django - have used established installations before but am
setting it up for the first time now. I am using vista 64 bit, the
current SVN tree, python 2.5.2 and sqlite and pretty much following
the tutorial. Everything went fine until I tried to access the admin
page (I can sync the databases etc, have added content and models).
I get a trackback (see below) when loading the admin page. It looks
superficially like a db access problem but I have done the path
correctly (fwd slashes), checked permission, monitored file access at
the OS level (django opens and closes the sqlite file ok) and then in
sheer frustrating added print statements to track django's access to
sqlite. It does successfully open and close the database several
times, creating the session entries for example using these queries
(and I've verified it puts things into the sqlite db)
'SELECT "django_session"."session_key", "django_session"."ses
sion_data", "django_session"."expire_date" FROM "django_session" WHERE
("django_
session"."session_key" = %s AND "django_session"."expire_date" >
%s )'
'SELECT (1) AS "a" FROM "django_session" WHERE "django_sessio
n"."session_key" = %s '
It then closes the database and *after* closing, tries the call stack
below which seems to blow up because the database isn't open. It's
driving me nuts and has left me feeling less than enthusiastic about
django having wasted a good day so far troubleshooting. Any help
greatly appreciated
Darren
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/core/servers/
basehttp.py", line 279, in run
self.result = application(self.environ, self.start_response)
File "/usr/lib/python2.5/site-packages/django/core/servers/
basehttp.py", line 651, in __call__
return self.application(environ, start_response)
File "/usr/lib/python2.5/site-packages/django/core/handlers/
wsgi.py", line 245, in __call__
response = middleware_method(request, response)
File "/usr/lib/python2.5/site-packages/django/contrib/sessions/
middleware.py", line 36, in process_response
request.session.save()
File "/usr/lib/python2.5/site-packages/django/contrib/sessions/
backends/db.py", line 58, in save
obj.save(force_insert=must_create)
File "/usr/lib/python2.5/site-packages/django/db/models/base.py",
line 410, in save
self.save_base(force_insert=force_insert,
force_update=force_update)
File "/usr/lib/python2.5/site-packages/django/db/models/base.py",
line 474, in save_base
rows = manager.filter(pk=pk_val)._update(values)
File "/usr/lib/python2.5/site-packages/django/db/models/query.py",
line 444, in _update
return query.execute_sql(None)
File "/usr/lib/python2.5/site-packages/django/db/models/sql/
subqueries.py", line 120, in execute_sql
cursor = super(UpdateQuery, self).execute_sql(result_type)
File "/usr/lib/python2.5/site-packages/django/db/models/sql/
query.py", line 2369, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python2.5/site-packages/django/db/backends/util.py",
line 19, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python2.5/site-packages/django/db/backends/sqlite3/
base.py", line 206, in execute
ret = Database.Cursor.execute(self, query, params)
OperationalError: unable to open database file
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---