Stunkymonkey/nautilus-open-any-terminal

TypeError when trying to open terminal (Fedora, Kitty)

Closed this issue · 2 comments

I'm on a Fedora Silverblue system and installed the extension successfully system-wide using the provided install script. Using the context menu, however, does not launch the terminal and instead generates the following error. I am using the kitty terminal and it is installed natively system-wide, not as a flatpak.

❯ nautilus
** Message: 18:59:16.691: Connecting to org.freedesktop.Tracker3.Miner.Files
Fontconfig warning: "/home/e/.config/fontconfig/fonts.conf", line 4: Use of ambiguous path in <dir> element. please add prefix="cwd" if current behavior is desired.
GSConnect: [Errno 2] No translation file found for domain: 'org.gnome.Shell.Extensions.GSConnect'
open-any-terminal: terminal is set to "kitty" opening a new window 
Traceback (most recent call last):
  File "/usr/share/nautilus-python/extensions/open_any_terminal_extension.py", line 370, in _menu_background_activate_cb
    self._open_terminal(file_)
  File "/usr/share/nautilus-python/extensions/open_any_terminal_extension.py", line 364, in _open_terminal
    open_terminal_in_file(filename)
  File "/usr/share/nautilus-python/extensions/open_any_terminal_extension.py", line 260, in open_terminal_in_file
    Popen(cmd, cwd=filename)
  File "/usr/lib64/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.12/subprocess.py", line 1883, in _execute_child
    self.pid = _fork_exec(
               ^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType

It's an issue caused by a recent PR. You can either use last working commit 135c001 or my PR branch, which will fix master when merged.

should be fixed via #104 . please reopen if not.