lanto03 / couchdb-python

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

db.compact() in client version 0.7 fails for couchdb 1.0.0 #141

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. connect to a couchdb server running 1.0.0 using client version 0.7
2. run db.compact()

>>> from couchdb.client import Server
>>> db = Server('http://127.0.0.1:5984')['my_db']
>>> db.compact()
Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    db.compact()
  File "/usr/local/lib/python2.6/dist-packages/CouchDB-0.7-py2.6.egg/couchdb/client.py", line 420, in compact
    _, _, data = self.resource.post_json('_compact')
  File "/usr/local/lib/python2.6/dist-packages/CouchDB-0.7-py2.6.egg/couchdb/http.py", line 378, in post_json
    status, headers, data = self.post(*a, **k)
  File "/usr/local/lib/python2.6/dist-packages/CouchDB-0.7-py2.6.egg/couchdb/http.py", line 360, in post
    **params)
  File "/usr/local/lib/python2.6/dist-packages/CouchDB-0.7-py2.6.egg/couchdb/http.py", line 398, in _request
    credentials=self.credentials)
  File "/usr/local/lib/python2.6/dist-packages/CouchDB-0.7-py2.6.egg/couchdb/http.py", line 289, in request
    raise ServerError((status, error))
ServerError: (415, ('bad_content_type', 'Content-Type must be 
application/json'))

Original issue reported on code.google.com by jims...@gmail.com on 16 Jul 2010 at 8:46

GoogleCodeExporter commented 8 years ago
Already fixed in r955dd73eed.

Original comment by matt.goo...@gmail.com on 16 Jul 2010 at 8:57