lanto03 / couchdb-python

Automatically exported from code.google.com/p/couchdb-python
Other
0 stars 0 forks source link

_fetch fails with map/reduce views (KeyError: 'id') #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create some documents
2. run a map/reduce view, like:
http://damienkatz.net/2008/02/incremental_map.html
3. try to print the rows

What is the expected output? What do you see instead?

# HTTP Response
{"rows":[{"key":"Batiste","value":1},{"key":"Yoan","value":2}]}

# traceback
Traceback (most recent call last):
  File "data.py", line 65, in <module>
    for message in messages:
  File "build/bdist.linux-i686/egg/couchdb/client.py", line 548, in __iter__
  File "build/bdist.linux-i686/egg/couchdb/client.py", line 567, in _get_rows
  File "build/bdist.linux-i686/egg/couchdb/client.py", line 561, in _fetch
KeyError: 'id'

What version of the product are you using? On what operating system?

couchdb-python: r71
couchdb: r663055

Please provide any additional information below.

I patched it very quickly but I assume that CouchDB API isn't finished at
this time.

Original issue reported on code.google.com by yoan.blanc on 5 Jun 2008 at 4:16

Attachments:

GoogleCodeExporter commented 8 years ago
Should be fixed by r76. Thanks!

Original comment by cmlenz on 26 Jun 2008 at 10:00

GoogleCodeExporter commented 8 years ago
Yes, a very basic patch that helped me going through ;-) Thanks.

Original comment by yoan.blanc on 26 Jun 2008 at 10:05