moz-phab producing excessive amount of unwanted output
Categories
(Conduit :: moz-phab, defect, P2)
Tracking
(Not tracked)
People
(Reporter: bytesized, Assigned: glob)
References
Details
(Keywords: conduit-triaged)
Attachments
(6 files)
I went to run moz-phab today, it took quite a while (I was submitting a couple of patches that touch a lot of files, so not unexpected). Once it had finished, I went back to the console window and saw that my entire scrollback was full of output from moz-phab. Clearly this is not desired behavior.
The command I ran seemed simple enough: moz-phab submit bookmark1 bookmark2
I'm posting two versions of the output I've seen. The first time I encountered this, I saw significantly longer output that included an entire section that I have not been able to replicate since. But the first time I encountered it, it went off the end of my scrollback, so that output is incomplete.
Note that both of these output files might seem short if you have word wrap turned off. But since the console wraps lines, they are overwhelmingly long in that context. Also of note is that there is a Python traceback in both versions of the output.
I'm running Windows 10. The patch stack I was submitting is attached to Bug 1585482.
Reporter | ||
Comment 1•4 years ago
|
||
Comment 2•4 years ago
|
||
I can't confirm. It looks like it's printing everything. What is your MozPhab version? moz-phab version
Updated•4 years ago
|
Comment 4•4 years ago
|
||
The error is UnicodeEncodeError: 'charmap' codec can't encode characters in position 248871-248873: character maps to <undefined>
which is triggered by logger.debug("%s %s" % (url.geturl(), api_call_args))
.
The string formatting is applied regardless of the logging level, so any unicode weirdness in api_call_args
would result in an error at this line.
Changing logging calls to be lazily evaluated, in this case logger.debug("%s %s", url.geturl(), api_call_args)
, would allow the code to continue past this statement (and probably fail later on, hopefully without dumping the entire JSON payload). pylint's W1201 rule catches this.
I suspect the core issue is a malformed unicode character (perhaps the source isn't UTF8 because Windows?).
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Is the issue solved?
I will try to reproduce it tomorrow.
Reporter | ||
Comment 8•4 years ago
|
||
It seems to be solved. I'm no longer seeing the unexpected output.
Reporter | ||
Comment 9•4 years ago
|
||
Let me know if I should file a new bug for this, but it seemed to be related so I thought I would post it here. I got the attached output today, which was also unwanted.
Reporter | ||
Comment 10•4 years ago
|
||
Here's another instance of what looks like the same problem as last time.
Assignee | ||
Comment 11•4 years ago
|
||
Traceback (most recent call last):
File "c:\mozilla-build\python3\lib\logging\__init__.py", line 1028, in emit
stream.write(msg + self.terminator)
File "c:\mozilla-build\python3\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u26a0' in position 97664: character maps to <undefined>
moz-phab is using cp1252 encoding when writing to the debug log file.
Assignee | ||
Comment 12•4 years ago
|
||
Assignee | ||
Comment 13•4 years ago
|
||
Description
•