Issue 227 in couchdb-python: NonASCII data in map/reduce functions when using stdlib json

6 views
Skip to first unread message

couchdb...@googlecode.com

unread,
Aug 3, 2013, 9:57:28 AM8/3/13
to couchdb...@googlegroups.com
Status: Assigned
Owner: kxepal
Labels: Type-Defect Priority-Medium

New issue 227 by kxepal: NonASCII data in map/reduce functions when using
stdlib json
http://code.google.com/p/couchdb-python/issues/detail?id=227

What steps will reproduce the problem?

See test_script.py

What is the expected output?

Reduced result

What do you see instead?

Traceback (most recent call last):
File "couchview.py", line 43, in <module>
for row in db.query(params_fun, reduce_to_sum, language='python',
group=True):

File "/home/user/.virtualenvs/bikes/local/lib/python2.7/site-packages/CouchDB-0.10dev-py2.7.egg/couchdb/client.py",
line 1158, in __iter__
return iter(self.rows)

File "/home/user/.virtualenvs/bikes/local/lib/python2.7/site-packages/CouchDB-0.10dev-py2.7.egg/couchdb/client.py",
line 1177, in rows
self._fetch()

File "/home/user/.virtualenvs/bikes/local/lib/python2.7/site-packages/CouchDB-0.10dev-py2.7.egg/couchdb/client.py",
line 1164, in _fetch
data = self.view._exec(self.options)

File "/home/user/.virtualenvs/bikes/local/lib/python2.7/site-packages/CouchDB-0.10dev-py2.7.egg/couchdb/client.py",
line 1060, in _exec
content = json.encode(body).encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 51:
ordinal not in range(128)

Please use labels and text to provide additional information.

Python-2.7.3
couchdb-python-0.8 and 0.10dev
stdlib json (there is no problem if simplejson used)


Attachments:
test_script.py 350 bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

couchdb...@googlecode.com

unread,
Jul 15, 2014, 3:51:03 AM7/15/14
to couchdb...@googlegroups.com

Comment #1 on issue 227 by djc.ochtman: NonASCII data in map/reduce
This issue has been migrated to GitHub. Please continue discussion here:

https://github.com/djc/couchdb-python/issues/227
Reply all
Reply to author
Forward
0 new messages