Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

Python client delete design doc

2 replies [Last post]
  • Login or register to post comments
Mon, 09/17/2012 - 10:01
cachvico
Offline
Joined: 06/21/2012
Groups:

Not sure if I've found a bit of unfinished functionality in the Python client; to delete design docs.

import couchbase
cb = couchbase.Server('localhost:8091', username='Administrator', password='password')
bucket = cb['epic']
bucket.delete('_design/place')

[2012-09-17 12:55:32,828] - [rest_client] [140735157635424] - ERROR - http://192.168.10.100:8092/epic/_design/_design/place error 400 reason: bad_request {"error":"bad_request","reason":"attachments not supported in Couchbase"}

Traceback (most recent call last):
File "unregister.py", line 4, in
bucket.delete('_design/place')
File "/Volumes/DATA/dv/epic/server/venv/lib/python2.7/site-packages/couchbase/client.py", line 263, in delete
rest.delete_view(self.name, view)
AttributeError: 'RestConnection' object has no attribute 'delete_view'

rest_client.py:214 does define delete_design_doc(self, bucket, design_doc) but this is never called.

Top
  • Login or register to post comments
Tue, 09/18/2012 - 12:31
ingenthr
Offline
Joined: 03/16/2010
Groups:

This isn't expected. I've filed an issue to track this:
http://www.couchbase.com/issues/browse/PYCBC-68

Question: what version of the server are you using? There had been some changes to design doc management not too long ago. I would expect 0.8.0 python client and server 2.0 beta will work together just fine.

Top
  • Login or register to post comments
Tue, 09/18/2012 - 16:02
cachvico
Offline
Joined: 06/21/2012
Groups:

Server is 2.0.0. I've updated the python client to 0.8.0 and the problem remains although with a different error message;

File "/Volumes/DATA/dv/epic/server/venv/lib/python2.7/site-packages/couchbase/client.py", line 254, in delete
rest.delete_view(self.name, view)
AttributeError: 'RestConnection' object has no attribute 'delete_view'

I think the problem lies simply within the Python client; inspecting client.py:254 there's a call to a non existent function delete_view().. probably should be RestConnection.delete_design_doc().

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker