Skip to content

Instantly share code, notes, and snippets.

@batok
Created February 25, 2009 01:46
Show Gist options
  • Save batok/69938 to your computer and use it in GitHub Desktop.
Save batok/69938 to your computer and use it in GitHub Desktop.
$ python client.py
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/httplib2-0.4.0-py2.6.egg/httplib2/__init__.py:44: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
......EE.E...F...F.
======================================================================
ERROR: test_include_docs (__main__.DatabaseTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "client.py", line 124, in test_include_docs
include_docs=True
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{bad_return_value,{os_process_error,{exit_status,133}}},\n {gen_server,call,\n [<0.11575.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) { emit(doc._id, null); }">>]}]}}'))
======================================================================
ERROR: test_query_multi_get (__main__.DatabaseTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "client.py", line 133, in test_query_multi_get
keys=range(1, 6, 2)))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{epipe,[{erlang,port_command,\n [#Port<0.356>,\n [91,\n [34,<<"add_fun">>,34],\n 44,\n [34,<<"function(doc) { emit(doc.i, null); }">>,34],\n 93,10]]},\n {couch_os_process,writeline,2},\n {couch_os_process,writejson,2},\n {couch_os_process,handle_call,3},\n {gen_server,handle_msg,5},\n {proc_lib,init_p,5}]},\n {gen_server,call,\n [<0.11602.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) { emit(doc.i, null); }">>]}]}}'))
======================================================================
ERROR: test_view_multi_get (__main__.DatabaseTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "client.py", line 148, in test_view_multi_get
res = list(self.db.view('test/multi_key', keys=range(1, 6, 2)))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 633, in _exec
**self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('case_clause', '{{epipe,[{erlang,port_command,\n [#Port<0.370>,\n [91,\n [34,<<"add_fun">>,34],\n 44,\n [34,<<"function(doc) { emit(doc.i, null); }">>,34],\n 93,10]]},\n {couch_os_process,writeline,2},\n {couch_os_process,writejson,2},\n {couch_os_process,handle_call,3},\n {gen_server,handle_msg,5},\n {proc_lib,init_p,5}]},\n {gen_server,call,\n [<0.11639.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) { emit(doc.i, null); }">>]}]}}'))
======================================================================
FAIL: Doctest: couchdb.client.Database.query
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 2131, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for couchdb.client.Database.query
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 454, in query
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 466, in couchdb.client.Database.query
Failed example:
for row in db.query(map_fun):
print row.key
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.Database.query[6]>", line 1, in <module>
for row in db.query(map_fun):
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{bad_return_value,{os_process_error,{exit_status,133}}},\n {gen_server,call,\n [<0.11682.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) {\\n if (doc.type == \'Person\')\\n emit(doc.name, null);\\n}">>]}]}}'))
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 471, in couchdb.client.Database.query
Failed example:
for row in db.query(map_fun, descending=True):
print row.key
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.Database.query[7]>", line 1, in <module>
for row in db.query(map_fun, descending=True):
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{epipe,[{erlang,port_command,\n [#Port<0.382>,\n [91,\n [34,<<"add_fun">>,34],\n 44,\n "\\"function(doc) {\\\\n if (doc.type == \'Person\')\\\\n emit(doc.name, null);\\\\n}\\"",\n 93,10]]},\n {couch_os_process,writeline,2},\n {couch_os_process,writejson,2},\n {couch_os_process,handle_call,3},\n {gen_server,handle_msg,5},\n {proc_lib,init_p,5}]},\n {gen_server,call,\n [<0.11688.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) {\\n if (doc.type == \'Person\')\\n emit(doc.name, null);\\n}">>]}]}}'))
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 476, in couchdb.client.Database.query
Failed example:
for row in db.query(map_fun, key='John Doe'):
print row.key
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.Database.query[8]>", line 1, in <module>
for row in db.query(map_fun, key='John Doe'):
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{bad_return_value,{os_process_error,{exit_status,133}}},\n {gen_server,call,\n [<0.11693.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) {\\n if (doc.type == \'Person\')\\n emit(doc.name, null);\\n}">>]}]}}'))
======================================================================
FAIL: Doctest: couchdb.client.ViewResults
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 2131, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for couchdb.client.ViewResults
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 668, in ViewResults
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 689, in couchdb.client.ViewResults
Failed example:
len(results)
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[7]>", line 1, in <module>
len(results)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 742, in __len__
return len(self.rows)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 898, in _request
raise ServerError((status_code, error))
ServerError: (500, ('badmatch', '{{bad_return_value,{os_process_error,{exit_status,133}}},\n {gen_server,call,\n [<0.11731.0>,\n {prompt,[<<"add_fun">>,\n <<"function(doc) {\\n emit([doc.type, doc.name], doc.name);\\n}">>]}]}}'))
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 696, in couchdb.client.ViewResults
Failed example:
for person in people:
print person.value
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[9]>", line 1, in <module>
for person in people:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 877, in _request
resp, data = _make_request()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 872, in _make_request
body=body, headers=headers)
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 1050, in request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 854, in _request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 831, in _conn_request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 715, in connect
error: [Errno 61] Connection refused
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 700, in couchdb.client.ViewResults
Failed example:
people.total_rows, people.offset
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[10]>", line 1, in <module>
people.total_rows, people.offset
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 762, in _get_total_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 877, in _request
resp, data = _make_request()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 872, in _make_request
body=body, headers=headers)
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 1050, in request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 854, in _request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 823, in _conn_request
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 874, in request
self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 911, in _send_request
self.endheaders()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 868, in endheaders
self._send_output()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 740, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 699, in send
self.connect()
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 715, in connect
error: [Errno 61] Connection refused
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 707, in couchdb.client.ViewResults
Failed example:
list(results[['City', 'Gotham City']])
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[11]>", line 1, in <module>
list(results[['City', 'Gotham City']])
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 735, in __iter__
for row in self.rows:
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 752, in _get_rows
self._fetch()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 745, in _fetch
data = self.view._exec(self.options)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 664, in _exec
}, **self._encode_options(options))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 847, in post
**params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 877, in _request
resp, data = _make_request()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 872, in _make_request
body=body, headers=headers)
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 1050, in request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 854, in _request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 823, in _conn_request
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 874, in request
self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 911, in _send_request
self.endheaders()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 868, in endheaders
self._send_output()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 740, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 699, in send
self.connect()
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 715, in connect
error: [Errno 61] Connection refused
----------------------------------------------------------------------
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 710, in couchdb.client.ViewResults
Failed example:
del server['python-tests']
Exception raised:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "<doctest couchdb.client.ViewResults[12]>", line 1, in <module>
del server['python-tests']
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 151, in __delitem__
self.resource.delete(validate_dbname(name))
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 837, in delete
return self._request('DELETE', path, headers=headers, **params)
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 877, in _request
resp, data = _make_request()
File "/Users/director/couchdb_python_26_svn/couchdb/client.py", line 872, in _make_request
body=body, headers=headers)
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 1050, in request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 854, in _request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 831, in _conn_request
File "build/bdist.macosx-10.3-ppc/egg/httplib2/__init__.py", line 715, in connect
error: [Errno 61] Connection refused
----------------------------------------------------------------------
Ran 19 tests in 16.725s
FAILED (failures=2, errors=3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment