You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# pylint: disable=missing-module-docstring# pylint: disable=too-few-public-methodsimportcopyclassMyData:
''' class docstring '''def__init__(self):
self.data= {}
defprocess(self):
''' another method is responsible for putting "static_key" '''copy.copy(self.data['static_key'])
pylintcrashedwitha``InferenceError``andwiththefollowingstacktrace:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/inference.py", line 401, in infer_subscript
assigned = value.getitem(index_value, context)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_classes.py", line 2252, in getitem
raise AstroidIndexError(index)
astroid.exceptions.AstroidIndexError:
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1024, in _check_files
self._check_file(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1063, in _check_file
check_astroid_module(ast_node)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1200, in check_astroid_module
retval = self._check_astroid_module(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1245, in _check_astroid_module
walker.walk(ast_node)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 78, in walk
self.walk(child)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 78, in walk
self.walk(child)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 78, in walk
self.walk(child)
[Previous line repeated 1 more time]
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 75, in walk
callback(astroid)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/checkers/stdlib.py", line 537, in visit_call
self._check_shallow_copy_environ(node)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/checkers/stdlib.py", line 488, in _check_shallow_copy_environ
for inferred in arg.inferred():
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_ng.py", line 465, in inferred
return list(self.infer())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_ng.py", line 99, in infer
yield from self._infer(context, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/decorators.py", line 136, in raise_if_nothing_inferred
yield next(generator)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/decorators.py", line 100, in wrapped
res = next(generator)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/inference.py", line 408, in infer_subscript
raise InferenceError(node=self, context=context) from exc
astroid.exceptions.InferenceError: Inference failed for <Subscript l.16 at 0x7fd870e47400>.
Configuration
No response
Command used
python -m pylint error_report
Pylint output
Exception on node <Call l.16 at 0x7fd870e47520>in file '/Users/.../fifth'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/inference.py", line 401, in infer_subscript
assigned = value.getitem(index_value, context)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_classes.py", line 2252, in getitem
raise AstroidIndexError(index)
astroid.exceptions.AstroidIndexError: <unprintable AstroidIndexError object>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 75, in walk
callback(astroid)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/checkers/stdlib.py", line 537, in visit_call
self._check_shallow_copy_environ(node)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/checkers/stdlib.py", line 488, in _check_shallow_copy_environ
forinferredinarg.inferred():
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_ng.py", line 465, in inferred
returnlist(self.infer())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_ng.py", line 99, in infer
yield from self._infer(context, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/decorators.py", line 136, in raise_if_nothing_inferred
yield next(generator)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/decorators.py", line 100, in wrapped
res = next(generator)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/inference.py", line 408, in infer_subscript
raise InferenceError(node=self, context=context) from exc
astroid.exceptions.InferenceError: Inference failed for<Subscript l.16 at 0x7fd870e47400>.
************* Module fifth
fifth:1:0: F0002: fifth: Fatal error while checking 'fifth'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in'/Users/.../Library/Caches/pylint/pylint-crash-2021-08-21-11.txt'. (astroid-error)
------------------------------------
Your code has been rated at 10.00/10
Bug description
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/inference.py", line 401, in infer_subscript
assigned = value.getitem(index_value, context)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_classes.py", line 2252, in getitem
raise AstroidIndexError(index)
astroid.exceptions.AstroidIndexError:
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1024, in _check_files
self._check_file(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1063, in _check_file
check_astroid_module(ast_node)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1200, in check_astroid_module
retval = self._check_astroid_module(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/lint/pylinter.py", line 1245, in _check_astroid_module
walker.walk(ast_node)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 78, in walk
self.walk(child)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 78, in walk
self.walk(child)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 78, in walk
self.walk(child)
[Previous line repeated 1 more time]
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 75, in walk
callback(astroid)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/checkers/stdlib.py", line 537, in visit_call
self._check_shallow_copy_environ(node)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pylint/checkers/stdlib.py", line 488, in _check_shallow_copy_environ
for inferred in arg.inferred():
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_ng.py", line 465, in inferred
return list(self.infer())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/nodes/node_ng.py", line 99, in infer
yield from self._infer(context, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/decorators.py", line 136, in raise_if_nothing_inferred
yield next(generator)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/decorators.py", line 100, in wrapped
res = next(generator)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astroid/inference.py", line 408, in infer_subscript
raise InferenceError(node=self, context=context) from exc
astroid.exceptions.InferenceError: Inference failed for <Subscript l.16 at 0x7fd870e47400>.
Configuration
No response
Command used
Pylint output
Expected behavior
no messages
Pylint version
OS / Environment
macOS 11.3.1 as well as Ubuntu 20.04.2 LTS on GitHub Actions
Additional dependencies
n/a
The text was updated successfully, but these errors were encountered: