The following code will raise a Conflict exception:
>>> from couchdb.client import Server
>>> server = Server('http://localhost:5984')
>>> db = server.create('test')
>>> db['test'] = {'name':'Manuel'}
>>> db['test'] = {'name':'Manuel'}
Output:
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 327, in
__setitem__
resp, data = self.resource.put(id, content=content)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 989, in put
**params)
File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1031, in _request
raise ResourceConflict(error)
couchdb.client.ResourceConflict: ('conflict', 'Document update conflict.')
The version I am using is 0.6 on Ubuntu Karmic, I have not had the time to
write a patch yet.
Original issue reported on code.google.com by eti...@gmail.com on 27 Oct 2009 at 10:08
Original issue reported on code.google.com by
eti...@gmail.com
on 27 Oct 2009 at 10:08