sublime-text-isort-plugin
sublime-text-isort-plugin copied to clipboard
isort doesn't load: ValueError: Attempted relative import in non-package
I'm seeing this in my console when I start ST2:
Reloading plugin /Users/tdhopper/Library/Application Support/Sublime Text 2/Packages/isort/isort_file.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 62, in reload_plugin
File "./isort_file.py", line 9, in <module>
from .isort import SortImports
ValueError: Attempted relative import in non-package
i've changed the import on isort_file.py to from isort import SortImports and it worked properly.
I've done the same as @haruanm with similar success with ST2 on Windows 8.1. Would be nice to make this work correctly by renaming the isort plugin module to not have the same name as the main isort package, though