Closed bdarnell closed 7 years ago
Hmm, I'm not sure why I never encountered this problem. I'll take a look at it.
Do you have any ideas about a good way of testing this on appveyor?
If my analysis is right, then simply adding pip install colorama
to appveyor.yml
would be enough to trigger a failure when tornado.testing.main
sets up logging.
Evidently, Jupyter is using colorama internally and ends up monkeypatching sys.stderr
. If I start up an IPython terminal, I see this:
In [1]: import sys
In [2]: sys.stderr
Out[2]: <colorama.ansitowin32.StreamWrapper at 0x3e1b240>
This causes line 149:
elif sys.stderr is getattr(colorama, 'wrapped_stderr', object()):
to give False
which then raises the error.
for anyone who needs immediate fix (also mentioned in SO): pip install tornado==4.4.3
Thanks!
For reference, ipython
(the terminal interface, which doesn't use tornado) uses colorama on Windows to generate coloured output. jupyter notebook
, which runs the notebook web server (built on tornado) does not use colorama, as far as I recall. Most Jupyter users on Windows will have colorama installed for IPython, though. Let me know if I can provide any more information from the Jupyter side.
@takluyver I'd be happy if you had any good suggestions about automating testing of this on appveyor (it's not clear to me if that's possible without having separate test instances with and without colorama present).
You could combine that dimension with an existing dimension in the test matrix - e.g. install colorama when running the tests on a 64-bit architecture, but not a 32-bit architecture. It's theoretically messy, but in practice I think that when one group fails, it will usually be easy to see which difference is responsible.
Some windows users are reporting "No supported color terminal library" errors at startup (the reports so far are by jupyter users; I don't know whether there's something about jupyter that is linked to this error or if that's just a large source of tornado-on-windows users). It looks like this can occur if
colorama
is installed butcolorama.init
has not been called.Source: https://stackoverflow.com/questions/43443974/no-supported-color-terminal-library-python-jupyter
CC @mivade