Open Arkangus opened 4 years ago
Hi @Arkangus and thanks for the feedback. The font in your screenshots looks like Consolas which would imply you're running Windows. Is that correct? And if so can you specify which version of Windows you are running? In case of Windows 10 please be precise in the exact version because that might turn out to be important.
Yesterday evening I released coloredlogs 14.0 which is intended to enable native Windows ANSI support (clearly this is not working for you). This requires Windows 10.0.14393 or newer. The code is intended to fallback to Colorama on older Windows installations, it could also be this part isn't working.
Also I can't help but notice that in your first screenshot the text info
is highlighted in the same exact color of red that all text has in the second screenshot - it seems like the default text color is red. Did you customize the coloredlogs default styling?
Hi,
Sorry for the missing information. Thank you for your library, it is quite nice!
I am using Windows 7 Pro.
I did not customize the coloredlogs default styling, as far as I know.
Thanks for the follow up @Arkangus.
I tested the native Windows 10 support in a Windows 10 virtual machine provided for free by Microsoft as part of releasing the new feature, so I was pretty confident it would work well on Windows 10.
This is why it doesn't surprise me to hear that you're running an older Windows version. Unfortunately that Windows 10 virtual machine is the only Windows installation that I have access to for testing purposes, so I was unable to test my changes for compatibility with older Windows versions.
I did test the Colorama fall back despite running an up-to-date Windows 10 installation by manually editing the module humanfriendly/terminal.py
to disable have_windows_native_ansi_support()
(make it return False
) however "unfortunately" both seem to work well in my environment:
(the plain text at the top I added for debugging purposes, it's not part of official releases)
I'm going to have to think a bit more about how to diagnose / debug / resolve this issue...
In an attempt to reproduce the issue without having access to a Windows 7 environment I tried (using the Windows 10 VM that I do have access to) to run the Python interpreter under the "Windows 7" as well as "Windows 8" compatibility modes however in both cases Colorama worked as intended (after disabling the check against the Windows 10 version by making have_windows_native_ansi_support()
return False
).
The only remaining approach that I can think of to continue diagnosing this issue further is to enhance the coloredlogs
and/or humanfriendly
packages with optional instrumentation that can be used to debug issues like these (e.g. using an environment variable).
When running the following code, the output is:
With coloredlogs v12.0: With coloredlogs v14.0:
I simply did a
python -m pip install coloredlogs==14.0
between the two screenshots. Any idea why I lost the different colors?