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
- 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.
PR #99 has been opened to resolve these issues.
Description
Running
google-colab-clicommands 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 deprecatedKernelClientattribute reference.Steps to Reproduce
google-colab-clion Windows.colab new -s my-session.Stack Trace / Error Logs
Additionally, during execution:
Proposed Solution
colab_cli/console.py: Wraptermiosandttyimports intry/except ImportErrorand guardtermios,tty,fileno(), andsignal.SIGWINCHusage.colab_cli/commands/automation.py: Add atry/except (OSError, FileNotFoundError)fallback foropen("/dev/tty")tosys.stdin.readline().colab_cli/runtime.py: Updatejupyter_kernel_client.KernelClientreference tojupyter_kernel_client.JupyterKernelClient.PR #99 has been opened to resolve these issues.