-
Notifications
You must be signed in to change notification settings - Fork 49
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 getting the repr of an object #260
Comments
Can confirm this problem may be a result of circular import. When installed via conda, the generated script is #!/bin/sh
'''exec' /opt/homebrew/anaconda3/envs/meeko_tutorial/bin/python "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from meeko.cli.mk_prepare_receptor import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main()) This problem is not observed with some other package managers like micromamba. As a walkaround for the time being, you could install meeko via pip or micromamba. We should fix this; we might want to rename the console scripts, or devert the entry points. |
Hi @ivnsch
|
I can't reproduce on linux. @rwxayheee did you observe the recursion error? |
Hi @diogomart! Yes, I can reproduce this when installed via conda on Mac. |
Do you know where the circular import happens? |
It seems like it’s caused by conflict of console script name and the actual script under cli. (You could see the generated script on Mac in my previous comment; it’s like in mk_prepare_receptor it wants to import main from mk_prepare_receptor). Maybe Linux has a console script that is generated differently (and same reason micromamba doesn’t have this issue. To fix this, either changing the console script (entry point) name or creating a different entry point (see the most recent PR) should work. I tested with a locally built conda package.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Diogo ***@***.***>
Sent: Sunday, December 1, 2024 10:59:18 PM
To: forlilab/Meeko ***@***.***>
Cc: Amy He ***@***.***>; Mention ***@***.***>
Subject: Re: [forlilab/Meeko] RecursionError: maximum recursion depth exceeded while getting the repr of an object (Issue #260)
Do you know where the circular import happens?
—
Reply to this email directly, view it on GitHub<#260 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AUZKPRRXLC5SRVDWX35JHZ32DQAMNAVCNFSM6AAAAABSZXPYPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJQG4ZDEMZTHA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I can't reproduce on a Mac either. From the code I don't see a path for recursion. We should meet and figure out where it is happening, I'm afraid it might be something weird like a conflicting installation of an older meeko where we missed an |
Yes, we can meet and discuss!
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Diogo ***@***.***>
Sent: Monday, December 2, 2024 11:02:30 AM
To: forlilab/Meeko ***@***.***>
Cc: Amy He ***@***.***>; Mention ***@***.***>
Subject: Re: [forlilab/Meeko] RecursionError: maximum recursion depth exceeded while getting the repr of an object (Issue #260)
I can't reproduce on a Mac either. From the code I don't see a path for recursion. We should meet and figure out where it is happening, I'm afraid it might be something weird like a conflicting installation of an older meeko where we missed an if __name__ == "__main__" guard.
—
Reply to this email directly, view it on GitHub<#260 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AUZKPRRYJV7ESKQHS6LFULL2DSVENAVCNFSM6AAAAABSZXPYPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJSGQ4DCMBRGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello @ivnsch I am reaching out to ask for your assistance in reproducing this issue. When I wrote the first reply to you, I could reproduce this but now I couldn't reproduce the exact issue. I'm afraid that #261 may be unnecessary and is not the right way to address this issue. Could you please let us know, if a startover from a new environment solve the issue? When updating or reinstalling a package, some old files might not be removed (renamed) properly, causing unexpected behaviors. I have encountered, and could still produce some other importlib-related issues if I attempted to downgrade or upgrade Meeko with conda in the same environment. I think the reason is that the entry point is not properly updated, while the package body is changing with the version. If this is the case, start over with a new environment and reinstall the required packages should always work. **If so, I will close #261 as unnecessary. ** Before, I was thinking that the problem was literally circular import but now I think it's not. If this is a persistent issue even with a new install in a new environment, could you please provide:
Either way, start over would be the best way to resolve the issue. Please let us know how it goes, and we're more than willing to help ^^ |
Hi, I just installed meeko from conda-forge and am following the basic docking for vina tutorial https://meeko.readthedocs.io/en/release/tutorial1.html#for-autodock-vina
and I get
What's wrong? thanks!
The text was updated successfully, but these errors were encountered: