DebuggingLoggerMiddleware crashes with "UnicodeDecodeError"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Raphaël Badin |
Bug Description
I enabled the DebuggingLogger
[Thu Sep 19 10:00:16.470053 2013] [:error] [pid 2467:tid 140661317871360] Logged from file middleware.py, line 231
[Thu Sep 19 10:00:16.899208 2013] [:error] [pid 2467:tid 140661317871360] Traceback (most recent call last):
[Thu Sep 19 10:00:16.899581 2013] [:error] [pid 2467:tid 140661317871360] File "/usr/lib/
[Thu Sep 19 10:00:16.899919 2013] [:error] [pid 2467:tid 140661317871360] msg = self.format(record)
[Thu Sep 19 10:00:16.900164 2013] [:error] [pid 2467:tid 140661317871360] File "/usr/lib/
[Thu Sep 19 10:00:16.900471 2013] [:error] [pid 2467:tid 140661317871360] return fmt.format(record)
[Thu Sep 19 10:00:16.900738 2013] [:error] [pid 2467:tid 140661317871360] File "/usr/lib/
[Thu Sep 19 10:00:16.901040 2013] [:error] [pid 2467:tid 140661317871360] record.message = record.getMessage()
[Thu Sep 19 10:00:16.901313 2013] [:error] [pid 2467:tid 140661317871360] File "/usr/lib/
[Thu Sep 19 10:00:16.901618 2013] [:error] [pid 2467:tid 140661317871360] msg = msg % self.args
[Thu Sep 19 10:00:16.901904 2013] [:error] [pid 2467:tid 140661317871360] UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128)
Related branches
- Gavin Panella (community): Approve
-
Diff: 239 lines (+48/-58)5 files modifiedsrc/maasserver/forms_settings.py (+0/-16)
src/maasserver/middleware.py (+19/-5)
src/maasserver/models/config.py (+0/-3)
src/maasserver/tests/test_forms_settings.py (+0/-14)
src/maasserver/tests/test_middleware.py (+29/-20)
Changed in maas: | |
milestone: | none → 13.10 |
assignee: | nobody → Raphaël Badin (rvb) |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
DebuggingLogger Middleware. process_ response( ) should probably encode the unicode strings it manipulates instead of just implicitly converting them to strings.