Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isort doesn't load: ValueError: Attempted relative import in non-package #18

Open
tdhopper opened this issue Apr 23, 2015 · 2 comments
Open

Comments

@tdhopper
Copy link

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
@haruanm
Copy link

haruanm commented Feb 1, 2016

i've changed the import on isort_file.py to from isort import SortImports
and it worked properly.

@jcb91
Copy link

jcb91 commented Dec 5, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants