#23946 closed Bug (fixed)
Runserver socket error in unicode fails to print error message
Description (last modified by ) ¶
In django.core.management.commands.runserver.Command#inner_run
, when catching socket error, can be a unicode problem.
For example, after error_text = str(e)
there can be an unicode text, so this line will raise UnicodeDecodeError
and will not exit runserver command:
self.stderr.write("Error: %s" % error_text)
Simple solution:
self.stderr.write("Error: %s" % error_text.decode('utf-8'))
Example of a problem: http://stackoverflow.com/questions/27248506/starting-with-django-server/27251575
Change History (7)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 10 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In bba545345f46f09245799f7ae0a22177a84eba71: