как
sudo aptitude install python-couchdb
In [1]: import couchdb
In [2]: couchdb.Server()
Out[2]: <Server 'http://localhost:5984/'>
In [3]: s =couchdb.Server()
In [6]: s.create('mmm')
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/home/devel/django_sites/worldpass/opencolab/Source/OpenColab/<ipython console> in <module>()
/usr/lib/pymodules/python2.6/couchdb/client.pyc in create(self, name)
202 :raise PreconditionFailed: if a database with that name already exists
203 """
--> 204 self.resource.put(validate_dbname(name))
205 return self[name]
206
/usr/lib/pymodules/python2.6/couchdb/client.pyc in put(self, path, content, headers, **params)
987 def put(self, path=None, content=None, headers=None, **params):
988 return self._request('PUT', path, content=content, headers=headers,
--> 989 **params)
990
991 def _request(self, method, path=None, content=None, headers=None,
/usr/lib/pymodules/python2.6/couchdb/client.pyc in _request(self, method, path, content, headers, **params)
1012 return _make_request(retry - 1)
1013 raise
-> 1014 resp, data = _make_request()
1015
1016 status_code = int(resp.status)
/usr/lib/pymodules/python2.6/couchdb/client.pyc in _make_request(retry)
1007 try:
1008 return self.http.request(uri(self.uri, path, **params), method,
-> 1009 body=body, headers=headers)
1010 except socket.error, e:
1011 if retry > 0 and e.args[0] == 54: # reset by peer
/usr/lib/pymodules/python2.6/httplib2/__init__.pyc in request(self, uri, method, body, headers, redirections, connection_type)
1127 content = ""
1128 else:
-> 1129 (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
1130 except Exception, e:
1131 if self.force_exception_to_status_code:
/usr/lib/pymodules/python2.6/httplib2/__init__.pyc in _request(self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey)
899 auth.request(method, request_uri, headers, body)
900
--> 901 (response, content) = self._conn_request(conn, request_uri, method, body, headers)
902
903 if auth:
/usr/lib/pymodules/python2.6/httplib2/__init__.pyc in _conn_request(self, conn, request_uri, method, body, headers)
869 pass
870 try:
--> 871 response = conn.getresponse()
872 except (socket.error, httplib.HTTPException):
873 if i == 0:
/usr/lib/python2.6/httplib.pyc in getresponse(self)
982 else:
983 response = self.response_class(self.sock, strict=self.strict,
--> 984 method=self._method)
985
986 response.begin()
/usr/lib/python2.6/httplib.pyc in __init__(self, sock, debuglevel, strict, method)
328
329 def __init__(self, sock, debuglevel=0, strict=0, method=None):
--> 330 self.fp = sock.makefile('rb', 0)
331 self.debuglevel = debuglevel
332 self.strict = strict
AttributeError: 'NoneType' object has no attribute 'makefile'
In [7]:
спасибо