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
{{ message }}
Repository navigation
[Bug]: Windows compatibility crashes ('termios' ModuleNotFoundError & KernelClient AttributeError) #100
Running google-colab-cli commands on Windows 11 / Windows PowerShell causes runtime crashes due to un-guarded Unix-specific standard library modules (termios, tty, signal.SIGWINCH, and /dev/tty) and a deprecated KernelClient attribute reference.
Steps to Reproduce
Install google-colab-cli on Windows.
Run colab new -s my-session.
Stack Trace / Error Logs
Traceback (most recent call last):
File "C:\Users\yashk\AppData\Roaming\uv\tools\google-colab-cli\Lib\site-packages\colab_cli\cli.py", line 26, in <module>
from colab_cli.commands import session, execution, files, automation, run, utility
File "C:\Users\yashk\AppData\Roaming\uv\tools\google-colab-cli\Lib\site-packages\colab_cli\commands\execution.py", line 29, in <module>
from colab_cli.console import connect_console
File "C:\Users\yashk\AppData\Roaming\uv\tools\google-colab-cli\Lib\site-packages\colab_cli\console.py", line 20, in <module>
import termios
ModuleNotFoundError: No module named 'termios'
Additionally, during execution:
AttributeError: module 'jupyter_kernel_client' has no attribute 'KernelClient'
Proposed Solution
colab_cli/console.py: Wrap termios and tty imports in try/except ImportError and guard termios, tty, fileno(), and signal.SIGWINCH usage.
colab_cli/commands/automation.py: Add a try/except (OSError, FileNotFoundError) fallback for open("/dev/tty") to sys.stdin.readline().
colab_cli/runtime.py: Update jupyter_kernel_client.KernelClient reference to jupyter_kernel_client.JupyterKernelClient.
@Tfloow Short answer: no released version fixes the Windows crash yet. I closed this by mistake earlier and have reopened it.
I checked main (a84e094) and the latest release, v0.7.4 (also the latest on PyPI), and the state is the same in both:
Problem from this issue
Status
Where
AttributeError: ... no attribute 'KernelClient'
Fixed in #125 (6235a67), shipped in v0.7.3 and later
src/colab_cli/runtime.py now falls back to JupyterKernelClient
ModuleNotFoundError: No module named 'termios'
Not fixed
src/colab_cli/console.py still does an unguarded import termios / import tty and uses signal.SIGWINCH
open("/dev/tty") in the Drive auth prompt
Not fixed
src/colab_cli/commands/automation.py
select() on stdin in colab ssh --proxy-mode
Not fixed
src/colab_cli/commands/ssh.py
So on Windows, colab from PyPI still fails at import time with the termios error. The README also still says Linux and macOS only.
None of the Windows PRs have been merged: #99, #135 and #158 are all open and waiting on maintainer review (as are #70, #75, #84 and #86). #99 currently has merge conflicts with main, so it needs a rebase before it can go in. Whether and when any of them gets merged is up to the maintainers; I'm not one.
Until then, the options are:
Use WSL, which works with the PyPI release as is.
Install from a fork branch that carries the Windows patches:
@francarl published a variant of that branch with @ramgeart's ssh --proxy-mode patch applied (see their comment on #99); I haven't tested that one myself.
Activity
Tfloow commentedon Oct 4, 2026
Will the pr #99 or #158 be merged? Still an issue as of October 2026
Tfloow commentedon Oct 4, 2026
Which commit or version of the package fix this? kr
Yash-Kavaiya commentedon Oct 4, 2026
@Tfloow Short answer: no released version fixes the Windows crash yet. I closed this by mistake earlier and have reopened it.
I checked
main(a84e094) and the latest release,v0.7.4(also the latest on PyPI), and the state is the same in both:AttributeError: ... no attribute 'KernelClient'v0.7.3and latersrc/colab_cli/runtime.pynow falls back toJupyterKernelClientModuleNotFoundError: No module named 'termios'src/colab_cli/console.pystill does an unguardedimport termios/import ttyand usessignal.SIGWINCHopen("/dev/tty")in the Drive auth promptsrc/colab_cli/commands/automation.pyselect()on stdin incolab ssh --proxy-modesrc/colab_cli/commands/ssh.pySo on Windows,
colabfrom PyPI still fails at import time with thetermioserror. The README also still says Linux and macOS only.None of the Windows PRs have been merged: #99, #135 and #158 are all open and waiting on maintainer review (as are #70, #75, #84 and #86). #99 currently has merge conflicts with
main, so it needs a rebase before it can go in. Whether and when any of them gets merged is up to the maintainers; I'm not one.Until then, the options are:
main, so it lacks the changes from the 0.7.x releases, and it doesn't include thessh --proxy-modefix.ssh --proxy-modepatch applied (see their comment on #99); I haven't tested that one myself.Tfloow commentedon Oct 4, 2026
Yeah I ended up using WSL for this matter. Thank you for your complete and intelligible answer.