-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
'ClassDef' object has no attribute 'value' #5266
Comments
Thanks for the report. Unfortunately, I'm unable to reproduce the crash with just the information you provided.
|
Here's the whole project. |
Also, it should be noted that the project this was templated from presumably worked fine with python 3.7 and pylint 2.9.5. That project is https://github.com/aws-samples/aws-cdk-project-structure-python |
I wasn't able to reproduce a crash. I did the following:
This is with python v3.8.11 (and pylint 2.11.1 installed from the Which version of Python are you running when you see the crash? |
Python 3.9.8 My only commit to the repository on Nov 6 did the updates to python 3.9.8 and CDK 1.130.0. Their approach is to use pip-compile to manage dependencies from the I only ran pylint the way their readme did it... by running Note that in the current version of the repository, pylint is commented out in |
@kastork Which pylint and astroid version did you use for testing? You only mentioned that it worked fine with |
The pylint and astroid versions are (I assume) the ones in the
I've been able to reproduce this in a Python 3.9.8 Docker container by running these exact scripts. I'll try to reduce it down to a more minimal reproduction case. |
I've reproduced this with the latest
but it does happen if I include one of the
I'll keep looking at this, hopefully it's fairly straightforward now we can reproduce it. |
I have a much simpler reproduction case, as a single file:
This doesn't fail if you replace the |
We merged #5332 today that should fix the issue. @timmartin Your last example is also fixed, although it is invalid. import pathlib
with pathlib.Path('/dev/null').open("r+") as chalice_config_file:
pass |
When parsing the following file:
pylint crashed with a
AttributeError
and with the following stacktrace:The text was updated successfully, but these errors were encountered: