Skip to content

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

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.

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