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

[BUG] Fatal error pylint: astroid-error #651

Closed
ryancausey opened this issue Jan 29, 2024 · 1 comment
Closed

[BUG] Fatal error pylint: astroid-error #651

ryancausey opened this issue Jan 29, 2024 · 1 comment

Comments

@ryancausey
Copy link

ryancausey commented Jan 29, 2024

Describe the bug A clear and concise description of what the bug is.

I'm getting a fatal error message when running prospector, but only when using Python 3.12. This error goes away when using Python 3.11.

To Reproduce Steps to reproduce the behavior:

  1. Clone https://gitlab.com/munipal-oss/fluctuate
  2. Ensure Python 3.12 is installed and available
  3. Run poetry install using Python 3.12 as the environment.
  4. Run poetry run prospector.
  5. See the error.

Expected behavior A clear and concise description of what you expected to happen.

The prospector run is supposed to succeed without error.

Screenshots If applicable, add screenshots to help explain your problem.

N/A

Environment (please complete the following information):

  • OS:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
  • Tool [e.g. pylint]: pylint
  • Prospector version [e.g. 1.1.7]: prospector 1.10.3
  • Python version [e.g. 3.6.8]: Python 3.12.1

Additional context Add any other context about the problem here. Putting the list of
dependencies installed, e.g. the output of pip freeze also helps.

Below is the output of running prospector on Python 3.12 and Python 3.11 to show the difference. This includes the computed profile. The locked dependencies are available in the repo in poetry.lock.

Prospector output with computed profile on Python 3.12
$ poetry run prospector --show-profile
Messages
========

fluctuate/migrations.py
Line: 1
  pylint: astroid-error / /home/rccausey/workspace/munipal-oss/fluctuate/fluctuate/migrations.py: Fatal error while checking '/home/rccausey/workspace/munipal-oss/fluctuate/fluctuate/migrations.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/rccausey/.cache/pylint/pylint-crash-2024-01-29-11-47-47.txt'.
Line: 817
  pycodestyle: E713 / test for membership should be 'not in' (col 47)



Profile
=======

autodetect: true
bandit:
disable: []
enable: []
options: {}
run: null
doc-warnings: false
dodgy:
disable: []
enable: []
options: {}
run: null
ignore-paths: []
ignore-patterns:
- ^docs?/
- ^tests?/?
- /tests?(/|$)
- .*/tests(/|$)
- (^|/)test_[_a-zA-Z0-9]+.py$
- (^|/)[_a-zA-Z0-9]+_tests?.py$
- (^|/)tests?.py
- ^setup.py$
- (^|/)\..+
max-line-length: null
mccabe:
disable: []
enable: []
options:
  max-complexity: 15
run: null
member-warnings: false
mypy:
disable: []
enable: []
options: {}
run: null
output-format: null
output-target: null
profile-validator:
disable: []
enable: []
options: {}
run: null
pycodestyle:
disable:
- E226
- E262
- E125
- E111
- E401
- E121
- E731
- E201
- E702
- E124
- E223
- E227
- N805
- E221
- N802
- E127
- W191
- E133
- N803
- N812
- E303
- W293
- N806
- E304
- N813
- E261
- E274
- E301
- E701
- E241
- E203
- W391
- N811
- W292
- E251
- E266
- E126
- E224
- E273
- E402
- E703
- E123
- E242
- E231
- E225
- N814
- W291
- E302
- E271
- N801
- E502
- E265
- E211
- E202
- E122
- E222
- E272
- E228
- N804
- E128
enable: []
options:
  max-line-length: 159
  single-line-if-stmt: n
run: null
pydocstyle:
disable:
- D400
- D401
- D102
- D000
- D100
- D103
- D101
enable: []
options: {}
run: false
pyflakes:
disable:
- F403
- F810
enable: []
options: {}
run: null
pylint:
disable:
- C0322
- multiple-statements
- pointless-except
- too-many-public-methods
- deprecated-lambda
- W0701
- bad-whitespace
- star-args
- C0323
- abstract-class-little-used
- superfluous-parens
- missing-function-docstring
- trailing-whitespace
- too-many-lines
- no-member
- fixme
- super-init-not-called
- invalid-name
- bad-builtin
- assignment-from-none
- global-variable-undefined
- anomalous-backslash-in-string
- too-many-return-statements
- abstract-method
- broad-except
- bad-continuation
- wrong-import-order
- empty-docstring
- ungrouped-imports
- no-name-in-module
- relative-import
- C0324
- attribute-defined-outside-init
- bad-mcs-classmethod-argument
- bad-classmethod-argument
- E1103
- redefined-outer-name
- exec-used
- W5103
- no-self-argument
- property-on-old-class
- too-many-instance-attributes
- unused-format-string-key
- bad-mcs-method-argument
- wildcard-import
- missing-class-docstring
- W0713
- too-many-ancestors
- no-init
- missing-docstring
- missing-module-docstring
- I0014
- global-statement
- no-self-use
- missing-final-newline
- too-few-public-methods
- unnecessary-semicolon
enable: []
options:
  max-attributes: 7
  max-branches: 15
  max-line-length: 159
  max-locals: 15
  max-module-lines: 1000
  max-parents: 7
  max-public-methods: 20
  max-returns: 6
  max-statements: 60
  min-public-methods: 1
run: null
pyright:
disable: []
enable: []
options: {}
run: null
pyroma:
disable:
- PYR04
- PYR18
- PYR15
- PYR16
- PYR17
- PYR19
enable: []
options: {}
run: null
requirements: []
strictness: medium
test-warnings: false
uses: []
vulture:
disable: []
enable: []
options: {}
run: null


Check Information
=================
       Started: 2024-01-29 11:47:47.146726
      Finished: 2024-01-29 11:47:49.670310
    Time Taken: 2.52 seconds
     Formatter: grouped
      Profiles: default, no_doc_warnings, no_test_warnings, strictness_medium, strictness_high, strictness_veryhigh, no_member_warnings
    Strictness: None
Libraries Used:
     Tools Run: dodgy, mccabe, profile-validator, pycodestyle, pyflakes, pylint
Messages Found: 2
External Config: pylint: /home/rccausey/workspace/munipal-oss/fluctuate/pyproject.toml
Prospector output with computed profile on Python 3.11
$ poetry run prospector --show-profile
Profile
=======

autodetect: true
bandit:
disable: []
enable: []
options: {}
run: null
doc-warnings: false
dodgy:
disable: []
enable: []
options: {}
run: null
ignore-paths: []
ignore-patterns:
- ^docs?/
- ^tests?/?
- /tests?(/|$)
- .*/tests(/|$)
- (^|/)test_[_a-zA-Z0-9]+.py$
- (^|/)[_a-zA-Z0-9]+_tests?.py$
- (^|/)tests?.py
- ^setup.py$
- (^|/)\..+
max-line-length: null
mccabe:
disable: []
enable: []
options:
  max-complexity: 15
run: null
member-warnings: false
mypy:
disable: []
enable: []
options: {}
run: null
output-format: null
output-target: null
profile-validator:
disable: []
enable: []
options: {}
run: null
pycodestyle:
disable:
- N803
- E126
- E211
- E502
- E133
- W292
- E227
- E123
- N814
- E262
- E202
- E203
- E121
- E266
- E274
- E273
- E224
- N806
- N805
- E271
- E303
- N813
- E731
- E201
- W391
- E223
- E124
- E231
- E401
- E304
- E125
- E261
- N802
- E111
- W191
- E122
- E226
- E703
- E225
- E701
- E301
- W291
- N812
- E272
- E228
- E127
- E128
- E242
- E221
- E402
- E702
- N801
- W293
- E265
- E222
- E251
- N811
- E302
- N804
- E241
enable: []
options:
  max-line-length: 159
  single-line-if-stmt: n
run: null
pydocstyle:
disable:
- D103
- D000
- D401
- D101
- D400
- D100
- D102
enable: []
options: {}
run: false
pyflakes:
disable:
- F403
- F810
enable: []
options: {}
run: null
pylint:
disable:
- missing-docstring
- fixme
- missing-function-docstring
- wrong-import-order
- bad-classmethod-argument
- no-self-use
- empty-docstring
- unused-format-string-key
- too-many-instance-attributes
- no-name-in-module
- ungrouped-imports
- abstract-method
- too-many-lines
- invalid-name
- too-few-public-methods
- C0322
- super-init-not-called
- exec-used
- W5103
- bad-builtin
- bad-continuation
- star-args
- bad-mcs-classmethod-argument
- missing-final-newline
- E1103
- unnecessary-semicolon
- deprecated-lambda
- wildcard-import
- no-member
- missing-class-docstring
- relative-import
- anomalous-backslash-in-string
- no-init
- redefined-outer-name
- missing-module-docstring
- bad-whitespace
- too-many-return-statements
- superfluous-parens
- global-statement
- assignment-from-none
- global-variable-undefined
- too-many-public-methods
- multiple-statements
- abstract-class-little-used
- W0713
- broad-except
- bad-mcs-method-argument
- property-on-old-class
- trailing-whitespace
- W0701
- I0014
- too-many-ancestors
- pointless-except
- attribute-defined-outside-init
- C0324
- no-self-argument
- C0323
enable: []
options:
  max-attributes: 7
  max-branches: 15
  max-line-length: 159
  max-locals: 15
  max-module-lines: 1000
  max-parents: 7
  max-public-methods: 20
  max-returns: 6
  max-statements: 60
  min-public-methods: 1
run: null
pyright:
disable: []
enable: []
options: {}
run: null
pyroma:
disable:
- PYR19
- PYR18
- PYR16
- PYR15
- PYR17
- PYR04
enable: []
options: {}
run: null
requirements: []
strictness: medium
test-warnings: false
uses: []
vulture:
disable: []
enable: []
options: {}
run: null


Check Information
=================
       Started: 2024-01-29 11:51:54.419097
      Finished: 2024-01-29 11:51:56.190172
    Time Taken: 1.77 seconds
     Formatter: grouped
      Profiles: default, no_doc_warnings, no_test_warnings, strictness_medium, strictness_high, strictness_veryhigh, no_member_warnings
    Strictness: None
Libraries Used:
     Tools Run: dodgy, mccabe, profile-validator, pycodestyle, pyflakes, pylint
Messages Found: 0
External Config: pylint: /home/rccausey/workspace/munipal-oss/fluctuate/pyproject.toml
@Pierre-Sassoulas
Copy link
Collaborator

Thank you for opening the issue, I'm going to close as duplicate of #641.

@Pierre-Sassoulas Pierre-Sassoulas closed this as not planned Won't fix, can't repro, duplicate, stale Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants