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

Exceptionss that can be raised in Python #4

Closed
Jammy2211 opened this issue Dec 24, 2019 · 2 comments
Closed

Exceptionss that can be raised in Python #4

Jammy2211 opened this issue Dec 24, 2019 · 2 comments

Comments

@Jammy2211
Copy link

When I integrate a very elliptical mass profile, I get the following GSL error:

/home/jammy/PycharmProjects/VirtualEnvs/PyAuto/bin/python3 /home/jammy/PycharmProjects/PyAuto/PyAutoLens/test_autolens/numerics/deflections/sersic.py
gsl: pyquad/integration/qags.c:562: ERROR: integral is divergent, or slowly convergent
Default GSL error handler invoked.

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Unfortunately, I can't bypass this exception using a try / except in Python, as the error is within pyquad and crashes the code.

Is there a neat way to stop this from crashing the code or returning a Python exception?

@AshKelly
Copy link
Owner

Yea there is. The master branch actually should fix this and output a python warning using the code Arnau wrote.

I'll just check through the code and make sure the tests are all ok and then push a release

@Jammy2211
Copy link
Author

Christmas came early!

@AshKelly AshKelly closed this as completed Mar 5, 2020
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

2 participants