Skip to content

[Bug]: Windows compatibility crashes ('termios' ModuleNotFoundError & KernelClient AttributeError) #100

Open

Description

@Yash-Kavaiya

Description

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

  1. Install google-colab-cli on Windows.
  2. 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

  1. colab_cli/console.py: Wrap termios and tty imports in try/except ImportError and guard termios, tty, fileno(), and signal.SIGWINCH usage.
  2. colab_cli/commands/automation.py: Add a try/except (OSError, FileNotFoundError) fallback for open("/dev/tty") to sys.stdin.readline().
  3. colab_cli/runtime.py: Update jupyter_kernel_client.KernelClient reference to jupyter_kernel_client.JupyterKernelClient.

PR #99 has been opened to resolve these issues.

Activity

  1. Tfloow commented on Oct 4, 2026

    @Tfloow

    Will the pr #99 or #158 be merged? Still an issue as of October 2026

  2. Tfloow commented on Oct 4, 2026

    @Tfloow

    Which commit or version of the package fix this? kr

  3. Yash-Kavaiya commented on Oct 4, 2026

    @Yash-Kavaiya
    Author

    @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:
      pip install git+https://github.com/Yash-Kavaiya/google-colab-cli.git@fix-windows-compatibility-and-kernel-client
      
      This is the fix: Add Windows compatibility and JupyterKernelClient fallback #99 branch. It is based on an older main, so it lacks the changes from the 0.7.x releases, and it doesn't include the ssh --proxy-mode fix.
    • @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.
  4. Tfloow commented on Oct 4, 2026

    @Tfloow

    Yeah I ended up using WSL for this matter. Thank you for your complete and intelligible answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions