lanto03 / couchdb-python

Automatically exported from code.google.com/p/couchdb-python
Other
0 stars 0 forks source link

ResponseNotReady exception thrown but operation apparently succeeds #178

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

$ python
Python 2.6.5 (release26-maint, Oct  7 2010, 18:53:17) 
[GCC 4.2.1 (Gentoo 4.2.1_p5664, Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import couchdb; couch = couchdb.Server()
>>> couch
<Server 'http://localhost:5984/'>
>>> couch.create('x1')
<Database 'x1'>
>>> couch.create('x2')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/client.py", line 201, in create
    self.resource.put_json(validate_dbname(name))
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 454, in put_json
    status, headers, data = self.put(*a, **k)
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 433, in put
    return self._request('PUT', path, body=body, headers=headers, **params)
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 468, in _request
    credentials=self.credentials)
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 287, in request
    resp = _try_request_with_retries(iter(self.retry_delays))
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 247, in _try_request_with_retries
    return _try_request()
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 276, in _try_request
    return conn.getresponse()
  File "/gentoo/usr/lib/python2.6/httplib.py", line 979, in getresponse
    raise ResponseNotReady()
httplib.ResponseNotReady
>>> couch.create('x2')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/client.py", line 201, in create
    self.resource.put_json(validate_dbname(name))
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 454, in put_json
    status, headers, data = self.put(*a, **k)
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 433, in put
    return self._request('PUT', path, body=body, headers=headers, **params)
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 468, in _request
    credentials=self.credentials)
  File "/gentoo/usr/lib/python2.6/site-packages/couchdb/http.py", line 356, in request
    raise PreconditionFailed(error)
couchdb.http.PreconditionFailed: (u'file_exists', u'The database could not be 
created, the file already exists.')

What is the expected output? What do you see instead?
No ResponseNotReady exception.

What version of the product are you using? On what operating system?
couchdb-python from trunk on Mac OS X
but the same happens with CouchDB 0.8 form pypi

Please provide any additional information below.
python 2.6.5

Original issue reported on code.google.com by nilton.v...@gmail.com on 28 Apr 2011 at 3:36

GoogleCodeExporter commented 8 years ago
I think it is the same problem as in 
http://code.google.com/p/couchdb-python/issues/detail?id=170

Original comment by daevaorn on 28 Apr 2011 at 6:40

GoogleCodeExporter commented 8 years ago
Closing as a duplicate to issue 170.

Original comment by djc.ochtman on 21 Sep 2012 at 7:23