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

Contradicting error message #880

Closed
vwiela opened this issue Oct 11, 2022 · 3 comments · Fixed by #877
Closed

Contradicting error message #880

vwiela opened this issue Oct 11, 2022 · 3 comments · Fixed by #877
Assignees
Labels
bug Something isn't working ✔️​ Issue / PR has been resolved
Milestone

Comments

@vwiela
Copy link

vwiela commented Oct 11, 2022

While trying to run a Tau-Leaping algorithm I found some confusing error message. In core.model.py line 1166 and 1167 the programm tests whether C++ or/and Numpy are installed.

 if not can_use_cpp and can_use_numpy:
            raise ModelError("Please install C++ or Numpy to use GillesPy2 solvers.")

The error message reads as if it is sufficient to have either C++ or Numpy installed and one does not need both, since the program selects the solver accordingly.
But the if clause is written in a way that the error is raised unless one has installed C++.

Hence, for me the if-clause is not matching the error message. And if I understood the rest of the code correctly the error message is correct and one should be able to run the programm without having C++ installed. But then one ends up getting this error because of the misstated if-clause.

@BryanRumsey BryanRumsey self-assigned this Oct 11, 2022
@BryanRumsey BryanRumsey added the bug Something isn't working label Oct 11, 2022
@BryanRumsey BryanRumsey added this to the 1.7.2 Release milestone Oct 11, 2022
@BryanRumsey
Copy link
Contributor

Thank you for reporting this issue it will be addressed in the next release. To clarify the confusion, NumPy is a requirement for GillesPy2.

@BryanRumsey BryanRumsey added the ✔️​ Issue / PR has been resolved label Oct 11, 2022
@vwiela
Copy link
Author

vwiela commented Oct 12, 2022

Thanks.
But is it possible to use gillespy2 just havingNumPy installed and not C++?
Because that is what I was trying and it did not work, but I got that error message all the time, which states that it should work solely with NumPy.

@BryanRumsey
Copy link
Contributor

Yes, we have the following solvers that work without the C++ dependencies:

gillespy2.ODESovler
gillespy2.NumPySSASolver
gillespy2.CLESolver
gillespy2.TauLeapingSolver
gillespy2.TauHybridSolver

To avoid the incorrect error message you could omit the algorithm argument from the model.run call or replace it with the solver argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ✔️​ Issue / PR has been resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants