We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The test_fieldstorage_not_multipart fails with the following error:
test_fieldstorage_not_multipart
_______ Test_cgi_FieldStorage_Py3_tests.test_fieldstorage_not_multipart ________ self = <test_compat.Test_cgi_FieldStorage_Py3_tests object at 0x7fffa6945950> def test_fieldstorage_not_multipart(self): from webob.compat import cgi_FieldStorage POSTDATA = b'{"name": "Bert"}' env = { 'REQUEST_METHOD': 'POST', 'CONTENT_TYPE': 'text/plain', 'CONTENT_LENGTH': str(len(POSTDATA)) } fp = BytesIO(POSTDATA) > fs = cgi_FieldStorage(fp, environ=env) tests/test_compat.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.7/cgi.py:499: in __init__ self.read_single() /usr/lib/python3.7/cgi.py:692: in read_single self.read_binary() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = FieldStorage(None, None) def read_binary(self): """Internal: read binary data.""" self.file = self.make_file() todo = self.length if todo >= 0: while todo > 0: data = self.fp.read(min(todo, self.bufsize)) # bytes if not isinstance(data, bytes): raise ValueError("%s should return bytes, got %s" % (self.fp, type(data).__name__)) self.bytes_read += len(data) if not data: self.done = -1 break if self._binary_file: self.file.write(data) else: > self.file.write(data.decode()) E TypeError: a bytes-like object is required, not 'str' /usr/lib/python3.7/cgi.py:717: TypeError
Tested with WebOb-1.8.7. The test fails with both Python 3.7.16 and Python 3.9.16.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
test_fieldstorage_not_multipart
fails with the following error:Tested with WebOb-1.8.7. The test fails with both Python 3.7.16 and Python 3.9.16.
The text was updated successfully, but these errors were encountered: