-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
pylint exceed maximum recursion depth #2388
Comments
Here's my somewhat easier reproduction:
The -j1 option makes pylint use a single threaded reporter which shows the traceback:
|
So it looks like this is just a stack limit issue (is not infinite recursion). The only way to reproduce this issue without pylint is to add extra calls to the call stack: import astroid
def f():
return astroid.extract_node("""
from diofant.simplify import hypersimp, simplify
def rsolve_hyper():
b = simplify(g)
s = hypersimp(b, n)
s.subs() #@
""").inferred()
def a(n=5):
if n > 0:
return a(n-1)
else:
return f()
a() I think I might merge a few astroid calls to lower the stack size |
I fixed this issue on a local branch, but running pylint on this package didn't complete even overnight.. Not sure if the fix is worth it -- I think astroid has some perf issues with complex class hierarchies |
We probably need to figure out what's the root cause of this problem. As Bryce mentioned, |
Is this for whole project tree? I have tried original example from bugreport (for |
Just for the original example. I stopped it after a couple of minutes, maybe it would have completed later on. |
I'm seeing the same issue on Python 3.7 and Windows 10 in VS Code. Any ideas how to resolve? |
Same issue with Python 3.7, Mojave 10.14, VS Code. |
Same issue with Python 3.7, VS Code 1.36.1 (1.36.1), Mojave 10.14.5 |
I'm running into that with the following code snippet:
Astroid |
Same error message with Python 3.7.3, Ubuntu 18.04.2, VS Code 1.36.1. Picture of error: https://imgur.com/a/PTNkteD |
My issue was resolved on Python 3.7.1 after upgrading to these versions: |
FWIW, I think I encountered the same or a similar bug. In my case, I tracked down that the problem was with the option |
- use pycodestyle instead of pep8 - disable import-outside-toplevel - remove numpy from whitelist because of pylint issue pylint-dev/pylint#2388
Thanks for the tip. I actually had that setting before and still keep it on. However, after upgrading to later versions of python and pylint and astroid I no longer have the issue even with the numpy whitelist setting. Python 3.7.1 |
Any updates on how to get rid of this issue? |
Any update on how to solve this issue? |
The original issue is no longer reproduceable with the following versions, installed from
It's also no longer reproduceable with the already released versions of pylint 2.4.4 and astroid 2.3.3. @skirpichev Please give it a go with the aforementioned versions and let us know if you can still reproduce the issue. For other folks commenting here, if your issue is not related to |
The issue is definitely not resolved, neither for 2.4.4, nor for 2.3.1 nor for 2.6. The only way to solve the problem is to downgrade Astroid to 2.2.5. Otherwise the problem occurs intermittently, which makes it hard to reproduce on a permanent basis. |
I'm also seeing the behavior with |
Facing the same issue with
|
@dickreuter can you please open a different issue with a reproducer in it please? |
I upgrade pylint from 2.5.3 to 2.14.1, then it is solved. |
There are similar errors in bugtracker, e.g. #1410, #1285, but I'm not sure the underlying reason for this issue is same.
Steps to reproduce
pylint --enable=old-raise-syntax diofant/solvers/recurr.py
Current behavior
It fails with
Expected behavior
No internal error.
pylint --version output
Some debugging
Note, that same error happens if you enable different checker instead, almost any disabled. For example,
exception-message-attribute
. The internal error disappears if I comment out line 527.The text was updated successfully, but these errors were encountered: