@JonB this chunk of code (which is where it all goes wrong) already has that. Does it need to be hard coded? stream = sys.stdout
if stream.errors == 'strict':
# emulate backslashreplace error handler
encoding = stream.encoding
msg = msg.encode(encoding, "backslashreplace").decode(encoding)
stream.write('%s\n' % msg)
stream.flush()
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Posts made by Swoboderz
-
RE: Help, plz. Been trying to solve this prob for a while
-
RE: Help, plz. Been trying to solve this prob for a while
>>> import sys >>> print(sys.stdout) <__main__.main.<locals>.StdoutCatcher object at 0x1093257b8> >>> print(sys.__stdout__) <_io.TextIOWrapper name='<stdout>' mode='w' encoding='US-ASCII'>
I'm trying to use a C extension..
-
Help, plz. Been trying to solve this prob for a while
File "/var/containers/Bundle/Application/D1ECCA2A-92A4-498F-9924-55A09E1EE6CD/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/distutils/log.py", line 32, in _log
if stream.errors == 'strict':
AttributeError: 'StdoutCatcher' object has no attribute 'errors'Why is it doing this,