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
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/inference_tip.py", line 38, in _inference_tip_cached
result = _cache[func, node]
KeyError: (<function infer_key_classes at 0x7fd7a30493a0>, <Call l.18 at 0x7fd7a20c89a0>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/pylint/checkers/utils.py", line 1344, in safe_infer
value = next(infer_gen)
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/nodes/node_ng.py", line [16](https://github.com/liangqingzhao/my_local_test/actions/runs/3628194094/jobs/6118923554#step:7:17)9, in infer
yield from self._infer(context=context, **kwargs)
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/decorators.py", line 140, in raise_if_nothing_inferred
yield next(generator)
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/decorators.py", line 109, in wrapped
for res in _func(node, context, **kwargs):
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/bases.py", line 165, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/nodes/node_ng.py", line 159, in infer
results = list(self._explicit_inference(self, context, **kwargs))
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/inference_tip.py", line 45, in _inference_tip_cached
result = _cache[func, node] = list(func(*args, **kwargs))
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/pylint_django/transforms/foreignkey.py", line 1[20](https://github.com/liangqingzhao/my_local_test/actions/runs/3628194094/jobs/6118923554#step:7:21), in infer_key_classes
MANAGER.ast_from_module_name(module_name)
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/manager.py", line [21](https://github.com/liangqingzhao/my_local_test/actions/runs/3628194094/jobs/6118923554#step:7:22)6, in ast_from_module_name
raise e
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/manager.py", line 161, in ast_from_module_name
found_spec = self.file_from_module_name(modname, context_file)
File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/astroid/manager.py", line [26](https://github.com/liangqingzhao/my_local_test/actions/runs/3628194094/jobs/6118923554#step:7:27)7, in file_from_module_name
raise value.with_traceback(None) # pylint: disable=no-member
astroid.exceptions.AstroidImportError: Failed to import module main.models with error:
No module named main.models.
error:
this is my model
if i change it to this way,the error will dissappear
do we must to use the second way,if not it will raise error
i find a similar issue #2995 also use this way to slove the error
The text was updated successfully, but these errors were encountered: