Describe the bug
Unless there is a '~/.i2csshrc' file i2cssh fails with the error message in the title of this report
My config
I don't normally have a .i2csshrc file. but adding one that is basically empty addresses the error. I put this content into a config file and got the script to work again:
---
version: 2
any and all commands fail in the absence of a config file
Expected behavior
Well of course i would expect this NOT to throw the error
Screenshots or stack traces
Here is the entire stack trace:
Traceback (most recent call last):
File "/opt/homebrew/bin/i2cssh", line 33, in <module>
sys.exit(load_entry_point('i2cssh==0.1.6', 'console_scripts', 'i2cssh')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.1.6/libexec/lib/python3.11/site-packages/i2cssh/main.py", line 6, in main
app(prog_name="i2cssh")
File "/opt/homebrew/Cellar/i2cssh/0.1.6/libexec/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.1.6/libexec/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.1.6/libexec/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.1.6/libexec/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/i2cssh/0.1.6/libexec/lib/python3.11/site-packages/i2cssh/lib.py", line 263, in app
or global_opts.get("tab_split")
^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'global_opts' where it is not associated with a value
Additional context
Add any other context about the problem here.
Describe the bug Unless there is a '~/.i2csshrc' file i2cssh fails with the error message in the title of this report
My config
Expected behavior Well of course i would expect this NOT to throw the error
Screenshots or stack traces Here is the entire stack trace:
Additional context Add any other context about the problem here.