Python CouchDB/httplib - 错误:[Errno 61] 连接被拒绝

发布于 2024-10-14 11:31:35 字数 1527 浏览 0 评论 0原文

有人收到此错误吗?请指教! httplib python 库似乎有一些问题。

Python 2.7 (r27:82508, Jul  3 2010, 20:17:05) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "copyright", "credits" or "license()" for more information.

>>> import couchdb
>>> couch = couchdb.Server()
>>> couch.create("foo")

Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    couch.create("foo")
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/client.py", line 193, in create
    self.resource.put_json(validate_dbname(name))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 405, in put_json
    status, headers, data = self.put(*a, **k)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 384, in put
    return self._request('PUT', path, body=body, headers=headers, **params)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 419, in _request
    credentials=self.credentials)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 239, in request
    resp = _try_request_with_retries(iter(self.retry_delays))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 205, in _try_request_with_retries
    raise e
error: [Errno 61] Connection refused

Did any one get this error? Please advice! There seems to be some problem with httplib python library.

Python 2.7 (r27:82508, Jul  3 2010, 20:17:05) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "copyright", "credits" or "license()" for more information.

>>> import couchdb
>>> couch = couchdb.Server()
>>> couch.create("foo")

Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    couch.create("foo")
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/client.py", line 193, in create
    self.resource.put_json(validate_dbname(name))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 405, in put_json
    status, headers, data = self.put(*a, **k)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 384, in put
    return self._request('PUT', path, body=body, headers=headers, **params)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 419, in _request
    credentials=self.credentials)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 239, in request
    resp = _try_request_with_retries(iter(self.retry_delays))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchdb/http.py", line 205, in _try_request_with_retries
    raise e
error: [Errno 61] Connection refused

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

彩虹直至黑白 2024-10-21 11:31:35

你有代理吗?通过执行以下操作进行检查:
python -c“导入 urllib;打印 urllib.getproxies()”

Are you behind a proxy ? check by doing:
python -c "import urllib; print urllib.getproxies()"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文