'AnsiTerm' object has no attribute 'buffer'

Fred Wright fw at fwright.net
Wed Jan 30 03:01:40 UTC 2019


On Tue, 29 Jan 2019, Gary E. Miller via devel wrote:
> On Tue, 29 Jan 2019 17:11:15 -0800
> Hal Murray via devel <devel at ntpsec.org> wrote:
>
>> Gary said:
>>> Update:
>>> Works: 2.7, 3.7
>>> Fails: 3.5, 3.6
>>
>> It was working a week or two ago.
>
> Yup.
>
>> Did we change anything?  (I don't think so.)
>
> Agreed, not in that area.  I have been assuming it was a local config issue.
>
>> Did something in Python change?
>
> Well, the way we use sys.stdout is warned about in the Python doc.  That
> is enough for me to want it aligned with the python doc.

The real question is why the build procedure thinks it needs to output 
'bytes' to the terminal, which is the only reason to use the IOWrapper 
stuff in the first place.  And the reason the latter may not work is 
because waf is interposing its AnsiTerm in the stdout stream, so it's not 
a normal Python stdout.

It can probably be worked around by prefixing the build command with 
"NOSYNC=1", which disables waf's AnsiTerm hackery.

Fred Wright


More information about the devel mailing list