You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
On trying to create query index in CouchDB 3.0.0, the request fails with an unpartitioned DB with message HTTPError: 400 Client Error: Bad Request invalid_partitioned_option
1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
Execute the following code
from cloudant import couchdb
from cloudant.design_document import DesignDocument
with couchdb("admin", "admin", url="http://127.0.0.1:5984") as couchClient:
_ = couchClient.create_database("foo")
with couchdb("admin", "admin", url="http://127.0.0.1:5984") as couchClient:
db = couchClient["foo"]
ddoc = DesignDocument(db, document_id="bar")
ddoc["language"] = "query"
ddoc.save()
with couchdb("admin", "admin", url="http://127.0.0.1:5984") as couchClient:
db = couchClient["foo"]
db.create_query_index(design_document_id="_design/bar",fields=["key"])
2. What you expected to happen
The index should get created
3. What actually happened
Error is thrown with message - HTTPError: 400 Client Error: Bad Request invalid_partitioned_option Requested partitioned option does not match existing value on design document _design/bar for url: http://127.0.0.1:5984/foo/_index
Environment details
CouchDB - 3.0.0
Python 3.7
python-cloudant - 2.13
4. Workaround
In the cloudant/index.py, partitioned option was set only for partitioned = True. I added an else clause for partition = False and that fixed the issue.
Updating line 157-158 of cloudant/index.py
if self._partitioned:
payload['partitioned'] = True
else:
payload['partitioned'] = False
The text was updated successfully, but these errors were encountered:
`create_query_index` does not always supply `partitioned` which is
always required by the service.
This commit changes that so that `partitioned` is now always
present in the `create_query_index` requests.
This fixes#468
`create_query_index` does not always supply `partitioned` which is
always required by the service.
This commit changes that so that `partitioned` is now always
present in the `create_query_index` requests.
This fixes#468
`create_query_index` does not always supply `partitioned` which is
always required by the service.
This commit changes that so that `partitioned` is now always
present in the `create_query_index` requests when defined.
This fixes#468
Please read these guidelines before opening an issue.
Bug Description
On trying to create query index in CouchDB 3.0.0, the request fails with an unpartitioned DB with message
HTTPError: 400 Client Error: Bad Request invalid_partitioned_option
1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
Execute the following code
2. What you expected to happen
The index should get created
3. What actually happened
Error is thrown with message -
HTTPError: 400 Client Error: Bad Request invalid_partitioned_option Requested partitioned option does not match existing value on design document _design/bar for url: http://127.0.0.1:5984/foo/_index
Environment details
4. Workaround
In the cloudant/index.py, partitioned option was set only for
partitioned = True
. I added an else clause forpartition = False
and that fixed the issue.Updating line 157-158 of cloudant/index.py
The text was updated successfully, but these errors were encountered: