You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the directory_tree plugin is disabled, multiple other plugins: filemanager, git_right_click, git_status, hide_project, and python_venv, fail with a KeyError:
Traceback (most recent call last):
File "/home/ethical_haquer/porcupine-venv/lib/python3.11/site-packages/porcupine/pluginloader.py", line 191, in _run_setup_and_set_status
info.module.setup()
File "/home/ethical_haquer/porcupine-venv/lib/python3.11/site-packages/porcupine/plugins/filemanager.py", line 419, in setup
tree = get_directory_tree()
^^^^^^^^^^^^^^^^^^^^
File "/home/ethical_haquer/porcupine-venv/lib/python3.11/site-packages/porcupine/plugins/directory_tree.py", line 522, in get_directory_tree
return get_horizontal_panedwindow().nametowidget("directory_tree_container.directory_tree")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/tkinter/__init__.py", line 1563, in nametowidget
w = w.children[n]
~~~~~~~~~~^^^
KeyError: 'directory_tree_container'
The text was updated successfully, but these errors were encountered:
ethical-haquer
changed the title
Setup failed when the directory_tree plugin is disabled
KeyError when the directory_tree plugin is disabled
Mar 10, 2024
Ideally there would be a way for plugins to depend on each other. For example, if you disable filemanager and directory_tree, and then enable filemanager, it would be nice if the plugin manager told you that you need to enable directory_tree first. This is similar to how sudo apt install foo also installs all dependencies of foo.
There is setup_before and setup_after, which controls the order in which plugins are loaded, but it's not quite the same thing. Even though the filemanager plugin defines setup_after = ["directory_tree"], Porcupine will attempt to set it up without the directory_tree if directory_tree is disabled.
When the directory_tree plugin is disabled, multiple other plugins: filemanager, git_right_click, git_status, hide_project, and python_venv, fail with a KeyError:
The text was updated successfully, but these errors were encountered: