UnicodeDecodeError in Python 2.7
--------------------------------
Key: CMIS-292
URL: https://issues.apache.org/jira/browse/CMIS-292
Project: Chemistry
Issue Type: Bug
Components: python-cmislib
Environment: Python 2.7, cmislib 0.4dev
Reporter: Jeff Potts
In Python 2.7, the testCreateDocumentUnicode test will fail with a
UnicodeDecodeError. This problem does not occur in Python 2.6.
ERROR: testCreateDocumentUnicode (__main__.RepositoryTest)
Create a new doc with unicode characters in the name
----------------------------------------------------------------------
Traceback (most recent call last):
File "cmislibtest.py", line 265, in testCreateDocumentUnicode
newDoc = self._repo.createDocument(documentName,
parentFolder=self._testFolder)
File "/opt/apache/chemistry/cmislib/src/cmislib/model.py", line 1137, in
createDocument
contentType, contentEncoding)
File "/opt/apache/chemistry/cmislib/src/cmislib/model.py", line 2784, in
createDocument
result = self._cmisClient.post(postUrl, xmlDoc.toxml(), ATOM_XML_ENTRY_TYPE)
File "/opt/apache/chemistry/cmislib/src/cmislib/model.py", line 252, in post
**kwargs)
File "/opt/apache/chemistry/cmislib/src/cmislib/net.py", line 239, in post
return opener.open(request)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",
line 392, in open
response = self._open(req, data)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",
line 410, in _open
'_open', req)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",
line 370, in _call_chain
result = func(*args)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",
line 1186, in http_open
return self.do_open(httplib.HTTPConnection, req)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py",
line 1155, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py",
line 941, in request
self._send_request(method, url, body, headers)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py",
line 975, in _send_request
self.endheaders(body)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py",
line 937, in endheaders
self._send_output(message_body)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py",
line 795, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 337:
ordinal not in range(128)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.