-
-
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
RecursionError: maximum recursion depth exceeded while calling a Python object #3318
Comments
I think this one is a duplicate of #3245. |
Nope, #3245 didn't fix this issue. The shell script provided by @ema-ava is not really needed to reproduce the issue. import pandas as pd
def get_date(data):
date_utc = pd.to_datetime(data['Date UTC']).dt
return date_utc.round('S')
stderr of
|
Hey Dear all, I think this is a regression problem on Astroid side. It does not make recursion error when using astroid 2.2.5 as @netoarmando mentioned in #3245 Tested file: /tmp/pylint_error.py import pandas as pd
def get_date(data):
date_utc = pd.to_datetime(data['Date UTC']).dt
return date_utc.round('S') I get the same recursion error as you @Thisch with that set-up: # pylint --version
pylint 2.4.4
astroid 2.3.3
Python 3.7.4 (default, Aug 13 2019, 20:35:49)
[GCC 7.3.0] Also with that following set-up (previous version of pylint): # pylint --version
pylint 2.3.1
astroid 2.3.3
Python 3.7.4 (default, Aug 13 2019, 20:35:49)
[GCC 7.3.0] But recursion error does not occur with previous version of astroid 2.2.5: # pylint --version
pylint 2.3.1
astroid 2.2.5
Python 3.7.4 (default, Aug 13 2019, 20:35:49)
[GCC 7.3.0] For which I happily get: # pylint /tmp/pylint_error.py
************* Module pylint_error
/tmp/pylint_error.py:1:0: C0111: Missing module docstring (missing-docstring)
/tmp/pylint_error.py:3:0: C0111: Missing function docstring (missing-docstring)
-----------------------------------
Your code has been rated at 5.00/10
|
Thx @redsharpbyte for triaging this issue. |
Hello @Thisch, that regression started after pylint-dev/astroid@79d5a3a and it was already fixed by this PR: pylint-dev/astroid#733. |
Thanks for the details. That's advanced :) Is the next release/tag of Astroid already planned ? |
This seems to have been fixed by pylint-dev/astroid#733. |
Having maximum recursions with pylint 2.3.1, 2.4.4. and also 2.6. Any suggestions on what I can do are greatly appreciated. |
@dickreuter while waiting the bug are fixed, you may try to rise the value of the python recursion limit. |
I'm really interested in #3318 (comment) . Are new astroid and pylint releases expected? |
@b-long yes new releases are expected soon. I can't tell more precisely when though. |
This fixes a problem we've encountered where pylint tests fail with this error: RecursionError: maximum recursion depth exceeded in comparison The bug appears to be this one: pylint-dev/pylint#3318 For the record, this was extremely hard to track down. The error appeared erratically, as there appears to be some caching (and invalidation + recreation) of tox environments and/or packages that feeds into this. We can revisit the version pinning in the future; at the moment, there's no other motivation for the pinning. Signed-off-by: Hugh Brown (Saint Aardvark the Carpeted) <aardvark@saintaardvarkthecarpeted.com>
Steps to reproduce
demo.py:
used a lintme.sh script to lint it:
Current behavior
Expected behavior
No linting issues
pylint --version output
pylint 2.4.4
astroid 2.3.3
Python 3.7.3
The text was updated successfully, but these errors were encountered: