'AnsiTerm' object has no attribute 'buffer'

Matthew Selsky Matthew.Selsky at twosigma.com
Wed Jan 23 21:08:19 UTC 2019


On Wed, Jan 23, 2019 at 12:23:26PM -0800, James Browning via devel wrote:
>    I think I remember seeing that. IIRC I was piping something somewhere.
>    That was back before pylib/poly.py though.

Per https://docs.python.org/2/library/io.html#io.TextIOBase:

buffer
The underlying binary buffer (a BufferedIOBase instance) that TextIOBase deals with. This is not part of the TextIOBase API and may not exist on some implementations.

Sounds like we need to add a hasattr() check for buffer before we mess with it.


Cheers,
-Matt


More information about the devel mailing list