sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
524 stars 75 forks source link

On Windows, text after errors occur is black-on-black #54

Closed toolness closed 2 years ago

toolness commented 7 years ago

I'm not sure if this is specifically a sphinx-autobuild problem or something that's due to a dependency or my system configuration, but I've noticed that when I run sphinx-autobuild on a Windows 10 system, all text after an error occurs is black text on a black background:

2017-05-16_14-04-58

I've tried changing the settings of my terminal so that e.g. my default background color isn't black, but that doesn't seem to help.

Whenever another error occurs, it does show up in red-on-black, but the text after it reverts to being black-on-black too.

pedrojuk commented 5 years ago

Have this too - it's annoying. I started out having to change the powershell colours in the Properties box; then I gave up and just started running sphinx-autobuild with the -N option which suppresses the colours.

pradyunsg commented 3 years ago

Thanks for reporting this! ^>^

Could someone confirm whether this behavior is visible with the current versions of Sphinx and sphinx-autobuild? I'm inclined to close this in a week or so, if no one flags this as still-a-problem.

strefli3 commented 3 years ago

I can verify that is is still a problem on windows 10 in git-bash. Versions below:

Sphinx==3.2.1
sphinx-autobuild==2020.9.1
jjyyxx commented 3 years ago

Have this too. Use -N flag or change https://github.com/executablebooks/sphinx-autobuild/blob/274445aba3c4bc75458f1a4c6b83f1e501fc71d4/src/sphinx_autobuild/utils.py#L50-L52

to

stdout = subprocess.Popen(
    args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True
).stdout

seems to workaround the issue. However, both methods lose color for stderr.

pradyunsg commented 2 years ago

I'm pretty sure I fixed this when I reworked the output handling of this project. If someone is still seeing this, please file a new issue. :)