Skip to content
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

OSX fails with resource.getrlimit (supplemental.py) #46

Closed
reskyner opened this issue Jul 10, 2019 · 5 comments
Closed

OSX fails with resource.getrlimit (supplemental.py) #46

reskyner opened this issue Jul 10, 2019 · 5 comments

Comments

@reskyner
Copy link

if os.name != 'nt':  # Resource module not available for Windows
        maxsize = resource.getrlimit(resource.RLIMIT_STACK)[-1]
        resource.setrlimit(resource.RLIMIT_STACK, (min(2 ** 28, maxsize), maxsize))

Causes the following error on OSX with python 3.6:

ValueError: current limit exceeds maximum limit

This has been encountered in a few other places, e.g.:
cea-hpc/clustershell#285

Easily fixed by ignoring for mac, like windows.

if os.name != 'nt' and platform.system() != 'Darwin':  
        maxsize = resource.getrlimit(resource.RLIMIT_STACK)[-1]
        resource.setrlimit(resource.RLIMIT_STACK, (min(2 ** 28, maxsize), maxsize))
@reskyner reskyner changed the title OSX fails with OSX fails with resource.getrlimit (supplemental.py) Jul 10, 2019
@mestia
Copy link
Contributor

mestia commented Jul 10, 2019

Causes the following error on OSX with python 3.6:

Isn't plip python2 only?

@reskyner
Copy link
Author

Good point...

@mestia
Copy link
Contributor

mestia commented Jul 20, 2019

Actually I am wrong, just learned that plip is python3 compatible since v1.4.0.b

@reskyner reskyner reopened this Jul 22, 2019
@tonyyzy
Copy link

tonyyzy commented Aug 6, 2019

@reskyner @mestia
Hey, I looked into this error, it seems to be a python bug with MacOS which was fixed not long ago. https://bugs.python.org/issue34602
If you use python3.7.4 then this issue shouldn't appear. (I tested with the 3.7.4 docker)

Alternatively, if you cloned the git repo as 'installation' method, you can comment out these three lines. As long as you are not doing something crazy, it should be safe.
https://github.com/ssalentin/plip/blob/8c36e35fb7f44992a14db4f3626316892a77e81f/plip/modules/supplemental.py#L392-L394

fkaiserbio added a commit that referenced this issue May 8, 2020
- fixes #46
- restructuring of modules
- updated in CHANGES.txt
- adds support to skip protonation
- redefines logging and log levels
- code quality improvements
- adds requirements.txt
@fkaiserbio
Copy link
Contributor

fixed in 9ae38d3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants