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

ImportError: cannot import name SortImports #2

Open
vbabiy opened this issue Nov 20, 2013 · 14 comments
Open

ImportError: cannot import name SortImports #2

vbabiy opened this issue Nov 20, 2013 · 14 comments

Comments

@vbabiy
Copy link

vbabiy commented Nov 20, 2013

I get this error when installing it in sublime 3

reloading plugin isort.isort_file
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 73, in reload_plugin
    m = importlib.import_module(modulename)
  File "X/importlib/__init__.py", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1577, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 671, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "isort_file in /Users/vbabiy/Library/Application Support/Sublime Text 3/Installed Packages/isort.sublime-package", line 3, in <module>
ImportError: cannot import name SortImports
reloading plugin isort.ordereddict
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 73, in reload_plugin
    m = importlib.import_module(modulename)
  File "X/importlib/__init__.py", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1577, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 671, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "ordereddict in /Users/vbabiy/Library/Application Support/Sublime Text 3/Installed Packages/isort.sublime-package", line 23, in <module>
ImportError: No module named 'UserDict'
@thijsdezoete
Copy link
Owner

Hi, thanks for reporting. @jpotterm is working on it

@dougwt
Copy link
Contributor

dougwt commented Jun 22, 2014

Any progress on this error? I am getting the same thing in Sublime Text 3.

@thijsdezoete
Copy link
Owner

Hi @dougwt no, not at all actually. Sorry for not reporting that back. You're welcome to provide the fix yourself? :)

@dougwt
Copy link
Contributor

dougwt commented Jun 26, 2014

@thijsdezoete I've submitted a pull request with my proposed fixes: #11

Cheers!

@dougwt
Copy link
Contributor

dougwt commented Jun 27, 2014

I'm not 100% sure how package control works... does a new version tag need to be created? It seems to still be installing the old version from Package Control.

@thijsdezoete
Copy link
Owner

@dougwt Hm, last time I merged something, when I reinstalled, it was just the new version. I never really took the time to properly solve the versioning/tagging thing, I can have a look this Wednesday if you like.

@dougwt
Copy link
Contributor

dougwt commented Jun 28, 2014

@thijsdezoete I think all that might be required is to tag the merged version as release 0.0.4

@thijsdezoete
Copy link
Owner

@dougwt Ah, ok, I pushed a new tag 0.0.4 now

@dougwt
Copy link
Contributor

dougwt commented Jun 28, 2014

@thijsdezoete Sorry, it looks like I may have been mistaken about the tag thing. However, now that I know Package Control was installing the latest version, I've gone back to the docs and it looks like the issue might be caused due to the way Package Control packages its plugins. I've submitted a pull request (#12) that includes a file telling Package Control not to package the plugin. Hopefully that solves the issue!

@thijsdezoete
Copy link
Owner

@dougwt did it?

@dougwt
Copy link
Contributor

dougwt commented Jun 28, 2014

@thijsdezoete I was still getting the ImportError after all of that. However, since the plugin was installed to a directory I was able to edit it directly until finding an import statement that works. (#13) I'm not sure if the .no-sublime-package is required at this point, but hopefully this should return the plugin to working order.

@thijsdezoete
Copy link
Owner

@dougwt Ok, so could we add that one to the repo, and then get this over with?
I really appreciate the time you're taking to get this done!
:)

@dougwt
Copy link
Contributor

dougwt commented Jun 28, 2014

You're quite welcome. Please accept Pull Request #13 and we'll see if that works!

@dougwt
Copy link
Contributor

dougwt commented Jun 28, 2014

Everything seems to be working in Sublime Text 3 at last 👍

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