-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Invoking i2cssh crashes with RuntimeError: There is no current event loop in thread 'MainThread'. when invoked with 1 or more host arguments. This happens with or without my .i2csshrc and even on a fresh install of homebrew and only i2cssh installed.
My config
- Include your ~/.i2csshrc (if you have one) -- no file
i2cssh qis(whereqisis a cluster in .i2cssh) ori2cssh -m user@host1.example.org -m user@host2.example.orgwhen there is no .i2cssh)
Expected behavior
An iTerm2 tab should be created with one pane per host.
Stack trace
Traceback (most recent call last):
File "/opt/homebrew/bin/i2cssh", line 7, in
sys.exit(main())
~~~~^^
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/i2cssh/main.py", line 6, in main
app(prog_name="i2cssh")
~~~^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/i2cssh/lib.py", line 303, in app
iterm2.run_until_complete(
~~~~~~~~~~~~~~~~~~~~~~~~~^
exec_in_iterm(groups, cmdline_opts, global_opts, current_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/iterm2/connection.py", line 507, in run_until_complete
return Connection().run_until_complete(coro, retry, debug)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/iterm2/connection.py", line 155, in run_until_complete
return self.run(False, coro, retry, debug)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.2.1/libexec/lib/python3.14/site-packages/iterm2/connection.py", line 220, in run
loop = asyncio.get_event_loop()
File "/opt/homebrew/Cellar/python@3.14/3.14.2/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/events.py", line 715, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
% threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.