diff --git a/requests/models.py b/requests/models.py index f33c3c3e68..305e615eab 100644 --- a/requests/models.py +++ b/requests/models.py @@ -834,6 +834,11 @@ def text(self): # # So we try blindly encoding. content = str(self.content, errors='replace') + except TypeError: + # A TypeError can be raised if encoding is None + # + # So we try blindly encoding. + content = str(self.content, errors='replace') return content