You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You may find a solution to your problem in the docs or issues.
Describe the bug
The "no_color=True" Console parameter does not seem to do anything on Windows 10. I tested on both Cmder and native cmd.exe terminals and got the same results. See screenshots below.
Cmder:
cmd.exe
for reference, this is what it looks like from my Ubuntu laptop:
Also happy to help fix this if you can point me in the right direction. Thank you!
It was an issue with rendering on "legacy" terminals on Windows, so would only affect people using older versions of cmd.
In legacy rendering, Rich calls Win32 APIs directly, rather than using the same codepath as on Linux/MacOS. Turns out that code didn't consider no_color at all!
Fixed as part of #2458, so this should be resolved in the next release of Rich. Keep an eye out for the next release and let us know if you hit any further issues with it 🙂
You may find a solution to your problem in the docs or issues.
Describe the bug
The "no_color=True" Console parameter does not seem to do anything on Windows 10. I tested on both Cmder and native cmd.exe terminals and got the same results. See screenshots below.
Cmder:
cmd.exe
for reference, this is what it looks like from my Ubuntu laptop:
Also happy to help fix this if you can point me in the right direction. Thank you!
Platform
Click to expand
OS: Windows 10
Cmder:
┌───────────────────────── <class 'rich.console.Console'> ─────────────────────────┐
│ A high level console interface. │
│ │
│ ┌──────────────────────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ color_system = 'windows' │
│ encoding = 'utf-8' │
│ file = <_io.TextIOWrapper name='' mode='w' encoding='utf-8'> │
│ height = 83 │
│ is_alt_screen = False │
│ is_dumb_terminal = False │
│ is_interactive = True │
│ is_jupyter = False │
│ is_terminal = True │
│ legacy_windows = True │
│ no_color = False │
│ options = ConsoleOptions( │
│ size=ConsoleDimensions(width=155, height=83), │
│ legacy_windows=True, │
│ min_width=1, │
│ max_width=155, │
│ is_terminal=True, │
│ encoding='utf-8', │
│ max_height=83, │
│ justify=None, │
│ overflow=None, │
│ no_wrap=False, │
│ highlight=None, │
│ markup=None, │
│ height=None │
│ ) │
│ quiet = False │
│ record = False │
│ safe_box = True │
│ size = ConsoleDimensions(width=155, height=83) │
│ soft_wrap = False │
│ stderr = False │
│ style = None │
│ tab_size = 8 │
│ width = 155 │
└──────────────────────────────────────────────────────────────────────────────────┘
┌─── <class 'rich._windows.WindowsConsoleFeatures'> ────┐
│ Windows features available. │
│ │
│ ┌───────────────────────────────────────────────────┐ │
│ │ WindowsConsoleFeatures(vt=False, truecolor=False) │ │
│ └───────────────────────────────────────────────────┘ │
│ │
│ truecolor = False │
│ vt = False │
└───────────────────────────────────────────────────────┘
┌────── Environment Variables ───────┐
│ { │
│ 'TERM': 'cygwin', │
│ 'COLORTERM': None, │
│ 'CLICOLOR': None, │
│ 'NO_COLOR': None, │
│ 'TERM_PROGRAM': None, │
│ 'COLUMNS': '157', │
│ 'LINES': '83', │
│ 'JUPYTER_COLUMNS': None, │
│ 'JUPYTER_LINES': None, │
│ 'JPY_PARENT_PID': None, │
│ 'VSCODE_VERBOSE_LOGGING': None │
│ } │
└────────────────────────────────────┘
platform="Windows"
cmd.exe
┌───────────────────────── <class 'rich.console.Console'> ─────────────────────────┐ │ A high level console interface. │ │ │ │ ┌──────────────────────────────────────────────────────────────────────────────┐ │ │ │ │ │ │ └──────────────────────────────────────────────────────────────────────────────┘ │ │ │ │ color_system = 'windows' │ │ encoding = 'utf-8' │ │ file = <_io.TextIOWrapper name='' mode='w' encoding='utf-8'> │ │ height = 30 │ │ is_alt_screen = False │ │ is_dumb_terminal = False │ │ is_interactive = True │ │ is_jupyter = False │ │ is_terminal = True │ │ legacy_windows = True │ │ no_color = False │ │ options = ConsoleOptions( │ │ size=ConsoleDimensions(width=119, height=30), │ │ legacy_windows=True, │ │ min_width=1, │ │ max_width=119, │ │ is_terminal=True, │ │ encoding='utf-8', │ │ max_height=30, │ │ justify=None, │ │ overflow=None, │ │ no_wrap=False, │ │ highlight=None, │ │ markup=None, │ │ height=None │ │ ) │ │ quiet = False │ │ record = False │ │ safe_box = True │ │ size = ConsoleDimensions(width=119, height=30) │ │ soft_wrap = False │ │ stderr = False │ │ style = None │ │ tab_size = 8 │ │ width = 119 │ └──────────────────────────────────────────────────────────────────────────────────┘ ┌─── <class 'rich._windows.WindowsConsoleFeatures'> ────┐ │ Windows features available. │ │ │ │ ┌───────────────────────────────────────────────────┐ │ │ │ WindowsConsoleFeatures(vt=False, truecolor=False) │ │ │ └───────────────────────────────────────────────────┘ │ │ │ │ truecolor = False │ │ vt = False │ └───────────────────────────────────────────────────────┘ ┌────── Environment Variables ───────┐ │ { │ │ 'TERM': None, │ │ 'COLORTERM': None, │ │ 'CLICOLOR': None, │ │ 'NO_COLOR': None, │ │ 'TERM_PROGRAM': None, │ │ 'COLUMNS': None, │ │ 'LINES': None, │ │ 'JUPYTER_COLUMNS': None, │ │ 'JUPYTER_LINES': None, │ │ 'JPY_PARENT_PID': None, │ │ 'VSCODE_VERBOSE_LOGGING': None │ │ } │ └────────────────────────────────────┘ platform="Windows"
rich==12.5.1
The text was updated successfully, but these errors were encountered: