jucacrispim / pylint-mongoengine

Pylint plugin to handle mongoengine stuff
GNU General Public License v3.0
15 stars 6 forks source link

Error with newest version of astroid #1

Closed markus1978 closed 5 years ago

markus1978 commented 5 years ago

Pylint-mongoengine does not work with the latest update of astroid (Nov. 25th 2018, 2.1.0). With 2.0.4 however, everything works smoothly (thx for that btw). Here is the error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/site-packages/pylint/__main__.py", line 8, in <module>
    pylint.run_pylint()
  File "/usr/local/lib/python3.6/site-packages/pylint/__init__.py", line 20, in run_pylint
    Run(sys.argv[1:])
  File "/usr/local/lib/python3.6/site-packages/pylint/lint.py", line 1521, in __init__
    linter.load_plugin_modules(self._plugins)
  File "/usr/local/lib/python3.6/site-packages/pylint/lint.py", line 650, in load_plugin_modules
    module = modutils.load_module_from_name(modname)
  File "/usr/local/lib/python3.6/site-packages/astroid/modutils.py", line 202, 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 245, in load_module_from_modpath
    module = imp.load_module(curname, mp_file, mp_filename, mp_desc)
  File "/usr/local/lib/python3.6/imp.py", line 245, in load_module
    return load_package(name, filename)
  File "/usr/local/lib/python3.6/imp.py", line 217, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.6/site-packages/pylint_mongoengine/__init__.py", line 19, in <module>
    from pylint_mongoengine.checkers.mongoengine import MongoEngineChecker
  File "/usr/local/lib/python3.6/site-packages/pylint_mongoengine/checkers/mongoengine.py", line 23, in <module>
    from pylint_mongoengine.utils import (node_is_subclass, name_is_from_qs,
  File "/usr/local/lib/python3.6/site-packages/pylint_mongoengine/utils.py", line 5, in <module>
    from astroid.util import YES
ImportError: cannot import name 'YES'
jucacrispim commented 5 years ago

I corrected this and released pylint_mongoengine 0.2.1 on PyPI.

Thank you!

markus1978 commented 5 years ago

Awesome. Thx.

On Mon, Nov 26, 2018 at 10:18 PM Juca notifications@github.com wrote:

I corrected this and released pylint_mongoengine 0.2.1 on PyPI.

Thank you!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jucacrispim/pylint-mongoengine/issues/1#issuecomment-441801521, or mute the thread https://github.com/notifications/unsubscribe-auth/ADVqXMxmteDS6JQR0oEWnapo0kIi_e7Tks5uzFqugaJpZM4Yyi39 .