So, if I understand correctly, creating new objects and saving them to
the database works correctly, and updating objects fails. Is that
correct? Is it an update from the admin interface or from code written
by you?

If the former, it might have something to do with db privileges. Which
back-end are you using, sqlite? In that case, are you running the
project while being the same user as the owner of the sqlite db-file?
If the back-end is another database, did you edit and modify write
privileges?

Wim


On Sep 27, 3:28 pm, pigmalione <p_go...@hotmail.com> wrote:
> Hello,
>
> When I attempt to save an existing db object I get the following
> error:
>
>   File "<console>", line 1, in <module>
>   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, i
> n _update
>     return query.execute_sql(None)
>   File "/usr/lib/python2.5/site-packages/django/db/models/sql/
> subqueries.py", li
> ne 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 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/django/db/backends/sqlite3/
> base.py", li
> ne 193, in execute
>     return Database.Cursor.execute(self, query, params)
> OperationalError: unable to open database file
>
> I can keep saving new objects, but once I edit an attribute and
> attempt to save, I get the above message.
>
> Can someone suggest something?
>
> Thanks a lot.
--~--~---------~--~----~------------~-------~--~----~
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 unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to