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

lint prospector task failing #3414

Closed
tony opened this issue Dec 18, 2017 · 2 comments
Closed

lint prospector task failing #3414

tony opened this issue Dec 18, 2017 · 2 comments
Labels
Needed: more information A reply from issue author is required

Comments

@tony
Copy link
Contributor

tony commented Dec 18, 2017

9e7bcb7

Places where it's happening:

See: pylint-dev/pylint-django#108

There seems to be version incompatibilities across pylint and pylint-django

lint runtests: PYTHONHASHSEED='2352777469'

lint runtests: commands[0] | prospector --profile-path=/home/travis/build/rtfd/readthedocs.org --profile=prospector-more --die-on-tool-error

Traceback (most recent call last):

  File "/home/travis/build/rtfd/readthedocs.org/.tox/lint/bin/prospector", line 11, in <module>

    sys.exit(main())

  File "/home/travis/build/rtfd/readthedocs.org/.tox/lint/lib/python2.7/site-packages/prospector/run.py", line 165, in main

    prospector.execute()

  File "/home/travis/build/rtfd/readthedocs.org/.tox/lint/lib/python2.7/site-packages/prospector/run.py", line 53, in execute

    for tool in self.config.get_tools(found_files):

  File "/home/travis/build/rtfd/readthedocs.org/.tox/lint/lib/python2.7/site-packages/prospector/config/__init__.py", line 45, in get_tools

    config_result = tool.configure(self, found_files)

  File "/home/travis/build/rtfd/readthedocs.org/.tox/lint/lib/python2.7/site-packages/prospector/tools/pylint/__init__.py", line 174, in configure

    self._prospector_configure(prospector_config, linter)

  File "/home/travis/build/rtfd/readthedocs.org/.tox/lint/lib/python2.7/site-packages/prospector/tools/pylint/__init__.py", line 34, in _prospector_configure

    linter.load_plugin_modules(['pylint_django'])

  File "/home/travis/build/rtfd/readthedocs.org/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 495, in load_plugin_modules

    module.register(self)

  File "/home/travis/build/rtfd/readthedocs.org/.tox/lint/lib/python2.7/site-packages/pylint_django/plugin.py", line 22, in register

    start = name_checker.config.const_rgx.pattern[:-2]

AttributeError: 'NoneType' object has no attribute 'pattern'

ERROR: InvocationError: '/home/travis/build/rtfd/readthedocs.org/.tox/lint/bin/prospector --profile-path=/home/travis/build/rtfd/readthedocs.org --profile=prospector-more --die-on-tool-error'

Unfortunately, if I try to pin pylint<=1.8 I get this:

tox -e lint
lint create: /Users/me/study/python/readthedocs/.tox/lint
lint installdeps: -r/Users/me/study/python/readthedocs/requirements/lint.txt
lint installed: alabaster==0.7.10,amqp==2.2.2,appdirs==1.4.3,astroid==1.6.0,Babel==2.5.1,beautifulsoup4==4.1.3,billiard==3.5.0.3,celery==4.1.0,celery-haystack==0.10,certifi==2017.11.5,click==6.7,CommonMark==0.5.5,cssselect==1.0.1,defusedxml==0.5.0,Django==1.11.7,django-allauth==0.32.0,django-annoying==0.10.1,django-appconf==1.0.2,django-cors-middleware==1.3.1,django-dynamic-fixture==1.8.5,django-extensions==1.7.4,django-formtools==2.1,django-gravatar2==1.4.0,django-guardian==1.4.6,django-haystack==2.6.0,django-kombu==0.9.4,django-messages-extends==0.5,django-taggit==0.22.1,django-tastypie==0.13.0,django-textclassifier==1.0,django-vanilla-views==1.0.4,djangorestframework==3.5.4,djangorestframework-jsonp==1.0.2,dnspython==1.15.0,docker-py==1.3.1,docutils==0.11,dodgy==0.1.9,elasticsearch==1.5.0,future==0.16.0,httplib2==0.7.7,imagesize==0.7.1,isort==4.2.15,Jinja2==2.10,jsonfield==1.0.3,kombu==4.1.0,lazy-object-proxy==1.3.1,linaro-django-pagination==2.0.3,livereload==2.5.1,lxml==3.3.5,Markdown==2.6.10,MarkupSafe==1.0,maxcdn==0.0.7,mccabe==0.6.1,mimeparse==0.1.3,mkdocs==0.14.0,mock==1.0.1,nilsimsa==0.3.7,nltk==3.2.5,oauthlib==2.0.6,packaging==16.8,pep8-naming==0.4.1,prospector==0.12.7,pycodestyle==2.0.0,pydocstyle==2.1.1,pyelasticsearch==0.7.1,pyflakes==1.6.0,Pygments==2.2.0,pylint==1.8.0,pylint-celery==0.3,pylint-common==0.2.5,pylint-django==0.7.2,pylint-flask==0.5,pylint-plugin-utils==0.2.6,pyparsing==2.2.0,pyquery==1.2.2,python-dateutil==2.6.1,python-mimeparse==1.6.0,python3-openid==3.1.0,pytz==2013b0,PyYAML==3.12,readthedocs==2.1.2,readthedocs-build==2.0.7,readthedocs-sphinx-ext==0.5.6,recommonmark==0.4.0,redis==2.10.6,requests==2.3.0,requests-oauthlib==0.8.0,requirements-detector==0.5.2,setoptconf==0.2.0,simplejson==3.13.2,six==1.10.0,slumber==0.7.1,snowballstemmer==1.2.1,Sphinx==1.5.3,sphinx-rtd-theme==0.2.5b1,sphinxcontrib-httpdomain==1.4.0,stripe==1.20.2,textblob==0.15.0,tornado==4.5.2,Unipath==1.1,urllib3==1.22,vine==1.1.4,virtualenv==15.0.1,websocket-client==0.44.0,wrapt==1.10.11
lint runtests: PYTHONHASHSEED='4072767701'
lint runtests: commands[0] | prospector --profile-path=/Users/me/study/python/readthedocs --profile=prospector-more --die-on-tool-error
Problem importing module base.py: cannot import name 'get_node_last_lineno'
Traceback (most recent call last):
  File "/Users/me/study/python/readthedocs/.tox/lint/bin/prospector", line 11, in <module>
    sys.exit(main())
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/prospector/run.py", line 165, in main
    prospector.execute()
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/prospector/run.py", line 53, in execute
    for tool in self.config.get_tools(found_files):
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/prospector/config/__init__.py", line 45, in get_tools
    config_result = tool.configure(self, found_files)
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/prospector/tools/pylint/__init__.py", line 174, in configure
    self._prospector_configure(prospector_config, linter)
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/prospector/tools/pylint/__init__.py", line 31, in _prospector_configure
    linter.load_plugin_modules(['pylint_common'])
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/pylint/lint.py", line 458, in load_plugin_modules
    module = modutils.load_module_from_name(modname)
  File "/Users/me/study/python/readthedocs/.tox/lint/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 "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/astroid/modutils.py", line 233, in load_module_from_modpath
    module = imp.load_module(curname, mp_file, mp_filename, mp_desc)
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/imp.py", line 245, in load_module
    return load_package(name, filename)
  File "/Users/me/study/python/readthedocs/.tox/lint/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 "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/pylint_common/__init__.py", line 1, in <module>
    from pylint_common.augmentations import apply_augmentations
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/pylint_common/augmentations.py", line 1, in <module>
    from pylint.checkers.base import BasicChecker, astroid
  File "/Users/me/study/python/readthedocs/.tox/lint/lib/python3.6/site-packages/pylint/checkers/base.py", line 48, in <module>
    from pylint.checkers.utils import get_node_last_lineno
ImportError: cannot import name 'get_node_last_lineno'
ERROR: InvocationError: '/Users/me/study/python/readthedocs/.tox/lint/bin/prospector --profile-path=/Users/me/study/python/readthedocs --profile=prospector-more --die-on-tool-error'
@humitos
Copy link
Member

humitos commented Dec 18, 2017

I've been working on this the other day. There is a PR that fix some problems with prospector at #3408

Can you check if those changes fix your issue? Thanks!

@humitos humitos added the Needed: more information A reply from issue author is required label Dec 18, 2017
@tony
Copy link
Contributor Author

tony commented Dec 19, 2017

Yep we're good.

14adb20

$ tox -e lint

lint create: /Users/me/study/python/readthedocs/.tox/lint
lint installdeps: -r/Users/me/study/python/readthedocs/requirements/lint.txt
lint installed: alabaster==0.7.10,amqp==2.2.2,appdirs==1.4.3,astroid==1.6.0,Babel==2.5.1,beautifulsoup4==4.1.3,billiard==3.5.0.3,celery==4.1.0,celery-haystack==0.10,certifi==2017.11.5,click==6.7,CommonMark==0.5.5,cssselect==1.0.1,defusedxml==0.5.0,Django==1.9.12,django-allauth==0.32.0,django-annoying==0.10.1,django-appconf==1.0.2,django-cors-middleware==1.3.1,django-dynamic-fixture==1.8.5,django-extensions==1.7.4,django-formtools==1.0,django-gravatar2==1.4.0,django-guardian==1.4.6,django-haystack==2.6.0,django-kombu==0.9.4,django-messages-extends==0.5,django-taggit==0.22.1,django-tastypie==0.13.0,django-textclassifier==1.0,django-vanilla-views==1.0.4,djangorestframework==3.5.4,djangorestframework-jsonp==1.0.2,dnspython==1.15.0,docker-py==1.3.1,docutils==0.11,dodgy==0.1.9,elasticsearch==1.5.0,future==0.16.0,httplib2==0.7.7,imagesize==0.7.1,isort==4.2.15,Jinja2==2.10,jsonfield==1.0.3,kombu==4.1.0,lazy-object-proxy==1.3.1,linaro-django-pagination==2.0.2,livereload==2.5.1,lxml==3.3.5,Markdown==2.6.10,MarkupSafe==1.0,maxcdn==0.0.7,mccabe==0.6.1,mimeparse==0.1.3,mkdocs==0.14.0,mock==1.0.1,nilsimsa==0.3.7,nltk==3.2.5,oauthlib==2.0.6,packaging==16.8,pep8-naming==0.4.1,prospector==0.12.7,pycodestyle==2.0.0,pydocstyle==2.1.1,pyelasticsearch==0.7.1,pyflakes==1.6.0,Pygments==2.2.0,pylint==1.7.5,pylint-celery==0.3,pylint-common==0.2.5,pylint-django==0.7.2,pylint-flask==0.5,pylint-plugin-utils==0.2.6,pyparsing==2.2.0,pyquery==1.2.2,python-dateutil==2.6.1,python-mimeparse==1.6.0,python3-openid==3.1.0,pytz==2013b0,PyYAML==3.12,readthedocs==2.1.2,readthedocs-build==2.0.7,readthedocs-sphinx-ext==0.5.6,recommonmark==0.4.0,redis==2.10.6,requests==2.3.0,requests-oauthlib==0.8.0,requirements-detector==0.5.2,setoptconf==0.2.0,simplejson==3.13.2,six==1.10.0,slumber==0.7.1,snowballstemmer==1.2.1,Sphinx==1.5.3,sphinx-rtd-theme==0.2.5b1,sphinxcontrib-httpdomain==1.4.0,stripe==1.20.2,textblob==0.15.0,tornado==4.5.2,Unipath==1.1,urllib3==1.22,vine==1.1.4,virtualenv==15.0.1,websocket-client==0.44.0,wrapt==1.10.11
lint runtests: PYTHONHASHSEED='3820300401'
lint runtests: commands[0] | prospector --profile-path=/Users/me/study/python/readthedocs --profile=prospector-more --die-on-tool-error
Check Information
=================
         Started: 2017-12-19 07:37:11.158190
        Finished: 2017-12-19 07:37:12.412343
      Time Taken: 1.25 seconds
       Formatter: grouped
        Profiles: prospector-more, prospector, full_pep8, doc_warnings, no_test_warnings, strictness_high, strictness_veryhigh, no_member_warnings
      Strictness: from profile
  Libraries Used: django, celery
       Tools Run: dodgy, pep257, pep8, profile-validator, pyflakes, pylint
  Messages Found: 0

lint runtests: commands[1] | prospector --profile-path=/Users/me/study/python/readthedocs --profile=prospector --die-on-tool-error
Check Information
=================
         Started: 2017-12-19 07:37:11.158190
        Finished: 2017-12-19 07:37:12.412343
      Time Taken: 1.25 seconds
       Formatter: grouped
        Profiles: prospector-more, prospector, full_pep8, doc_warnings, no_test_warnings, strictness_high, strictness_veryhigh, no_member_warnings
      Strictness: from profile
  Libraries Used: django, celery
       Tools Run: dodgy, pep257, pep8, profile-validator, pyflakes, pylint
  Messages Found: 0

lint runtests: commands[1] | prospector --profile-path=/Users/me/study/python/readthedocs --profile=prospector --die-on-tool-error
Messages
========

core/management/commands/clean_builds.py
  Line: 47
    pylint: deprecated-method / Using deprecated method warn() (col 20)

doc_builder/environments.py
  Line: 384
    pylint: deprecated-method / Using deprecated method warn() (col 16)
  Line: 561
    pylint: deprecated-method / Using deprecated method warn() (col 20)

rtd_tests/base.py
  Line: 173
    pylint: deprecated-method / Using deprecated method assertRegexpMatches() (col 12)



Check Information
=================
         Started: 2017-12-19 07:37:13.186694
        Finished: 2017-12-19 07:38:29.315487
      Time Taken: 76.13 seconds
       Formatter: grouped
        Profiles: prospector, full_pep8, doc_warnings, no_test_warnings, strictness_low, strictness_medium, strictness_high, strictness_veryhigh, no_member_warnings
      Strictness: from profile
  Libraries Used: django, celery
       Tools Run: dodgy, pep257, pep8, profile-validator, pyflakes, pylint
  Messages Found: 4

ERROR: InvocationError: '/Users/me/study/python/readthedocs/.tox/lint/bin/prospector --profile-path=/Users/me/study/python/readthedocs --profile=prospector --die-on-tool-error'
_____________________________________________________________________________________ summary _____________________________________________________________________________________
ERROR:   lint: commands failed

@tony tony closed this as completed Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: more information A reply from issue author is required
Projects
None yet
Development

No branches or pull requests

2 participants