Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Crash when using pylint_django #217

Closed
dccarmo opened this issue May 16, 2017 · 3 comments
Closed

Crash when using pylint_django #217

dccarmo opened this issue May 16, 2017 · 3 comments
Labels

Comments

@dccarmo
Copy link

dccarmo commented May 16, 2017

I'm adding pylint_django to my .pylintrc load-plugins section. When I do that, linter-pylint crashes upon running. This is my issue.

Now if I try running pylint on the terminal, it runs without any issue, even loading the plugin from .pylintrc. So my guess is there's some issue on linter-pylint that's crashing when loading this plugin.

Continuing the discussion from #17, here's the development output from the console:

linter-registry.js [sm]:137 [Linter] Error running Pylint Error: Traceback (most recent call last):
  File "/usr/local/bin/pylint", line 11, in <module>
    sys.exit(run_pylint())
  File "/usr/local/lib/python3.6/site-packages/pylint/__init__.py", line 13, in run_pylint
    Run(sys.argv[1:])
  File "/usr/local/lib/python3.6/site-packages/pylint/lint.py", line 1265, in __init__
    linter.load_plugin_modules(plugins)
  File "/usr/local/lib/python3.6/site-packages/pylint/lint.py", line 468, in load_plugin_modules
    module = modutils.load_module_from_name(modname)
  File "/usr/local/lib/python3.6/site-packages/astroid/modutils.py", line 190, in load_module_from_name
    return load_module_from_modpath(dotted_name.split('.'), path, use_sys)
  File "/usr/local/lib/python3.6/site-packages/astroid/modutils.py", line 232, in load_module_from_modpath
    mp_file, mp_filename, mp_desc = imp.find_module(part, path)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'pylint_django'
    at Object.<anonymous> (/Users/diogo/.atom/packages/linter-pylint/lib/main.js:161:17)
    at next (<anonymous>)
    at step (/Users/diogo/.atom/packages/linter-pylint/lib/main.js:7:273)(anonymous function) @ linter-registry.js [sm]:137
@dccarmo
Copy link
Author

dccarmo commented May 16, 2017

Oh I see it now, pylint_django is installed on my virtualenv, and not global. I just needed to install it global (or setup to use my virtualenv version).

@dccarmo dccarmo closed this as completed May 16, 2017
@ddaanet
Copy link
Contributor

ddaanet commented May 17, 2017

You are welcome.

Teddy Bear, out.

@Shelagh-Lewins
Copy link

Could you explain how to setup the virtualenv version please?

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

No branches or pull requests

4 participants