On Sep 8, 2008, at 5:18 AM, Harish K Vishwanath wrote:
> Hello,
>
> I am getting the below exception :
>
> Traceback (most recent call last):
> File "d:\recogsys\src\python\RSITerm\SQLConvert\SqlDB.py", line
> 134, in sqlCommit
> self.session.commit()
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\session.py", line 668, in commit
> self.transaction.commit()
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\session.py", line 374, in commit
> self._prepare_impl()
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\session.py", line 358, in _prepare_impl
> self.session.flush()
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\session.py", line 1358, in flush
> self._flush(objects)
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\session.py", line 1426, in _flush
> flush_context.execute()
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\unitofwork.py", line 261, in execute
> UOWExecutor().execute(self, tasks)
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\unitofwork.py", line 758, in execute
> self.execute_delete_steps(trans, task)
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\unitofwork.py", line 777, in
> execute_delete_steps
> self.delete_objects(trans, task)
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\unitofwork.py", line 764, in delete_objects
> task.mapper._delete_obj(task.polymorphic_todelete_objects, trans)
> File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta4dev_r5060-
> py2.4.egg\sqlalchemy\orm\mapper.py", line 1349, in _delete_obj
> raise exc.ConcurrentModificationError("Deleted rowcount %d does
> not match number of objects deleted %d" % (c.rowcount,
> len(del_objects)))
> ConcurrentModificationError: Deleted rowcount 0 does not match
> number of objects deleted 1
>
> when trying to delete a UserObject which is in the DB. When is this
> exception raised? Is there anything wrong...
it means you marked an object as deleted with session.delete(), but
when the flush occurs, the row has already been deleted via some other
means.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---