FlowIDE icon indicating copy to clipboard operation
FlowIDE copied to clipboard

Plugin does not load on Sublime Text 4: import plugin_state fails

Open dpc00 opened this issue 2 months ago • 0 comments

FlowIDE does nothing on Sublime Text 4 (build 4200, Linux): flow_ide.py fails to import, so no listener or command is registered.

Cause: flow_ide.py line 1 and flowide/util.py line 2 use import plugin_state. That only works when the package folder is on sys.path, which it is not in Sublime Text 4's Python 3.3 host (the plugin has no .python-version). In the host, sys.modules has FlowIDE and FlowIDE.plugin_state but no FlowIDE.flow_ide. Right after installing, the console shows ImportError: No module named 'plugin_state' from flow_ide.py, line 1.

Fix: from . import plugin_state in flow_ide.py and from .. import plugin_state in flowide/util.py. With those two changes in a copy of the package, all flowide modules load.

(There is a second, separate problem with current Flow, filed as its own issue.)

dpc00 avatar Oct 06 '26 19:10 dpc00