-
Notifications
You must be signed in to change notification settings - Fork 7
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
Unknown Error after installing CNApy-1.2.2 #528
Comments
Thank you for submitting this issue :-) It looks like something is wrong with optlang's usage of Gurobi :O, maybe something changed in the gurobipy API, we'll check if we can reproduce it :3 In the meantime, you could try to use a different solver by switching, e.g., to GLPK or CPLEX (for the latter, keep in mind that only the small Community version is installed by default) in the cobrapy settings under "Config"->"Configure COBRApy..." |
Thanks for looking into it! Now that I think about it I should maybe mention that I do not have the latest version of gurobi installed, but I just tried installing CNApy on my personal laptop (where no gurobi is installed at all) and it gave me the same error. (once again after activating CNApy which was installed using the 3rd option as mentioned previously). If you want I can get back to you with the specific gurobi version that was installed on the other computer, but im not sure it will help much. |
Can you launch a Python interpreter in your CNApy environment and execute the following commands:
Does this work or do you get a similar error as above? |
Hi, |
Thanks! For anyone coming across this thread, after running: pip install cnapy run the following to fix the issue: pip install gurobipy==11.0.3 Now you can safely launch CNApy by running: cnapy (https://github.com/cnapy-org/CNApy/blob/master/README.md#installation-options ) (3rd option) |
Describe the bug
After installing CNApy either with install_cnapy_here using the CNApy installer or installing CNApy using conda (3rd option as described here: https://github.com/cnapy-org/CNApy/blob/master/README.md#installation-options ) I get the following error when I try to lauch/ run CNApy:
Is this an actual bug or am I doing something wrong?
Error message in text:
Traceback (most recent call last): File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\runpy.py", line 196, in _run_module_as_main return run_code(code, main_globals, None, File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\runpy.py", line 86, in run_code exec(code, run_globals) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cnapy_main.py", line 37, in main_cnapy() File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cnapy_main.py", line 34, in main_cnapy Application() File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cnapy\application.py", line 76, in init self.window = MainWindow(self.appdata) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cnapy\gui_elements\main_window.py", line 70, in init self.central_widget = CentralWidget(self) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cnapy\gui_elements\central_widget.py", line 72, in init self.reaction_list = ReactionList(self) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cnapy\gui_elements\reactions_list.py", line 148, in init self.reaction_mask = ReactionMask(self) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cnapy\gui_elements\reactions_list.py", line 698, in init self.grp_test_model.add_reactions([reaction]) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cobra\core\model.py", line 757, in add_reactions self._populate_solver(pruned) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cobra\core\model.py", line 1132, in _populate_solver if reaction.id not in self.variables: File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\cobra\core\model.py", line 1017, in variables return self.solver.variables File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\optlang\interface.py", line 1239, in variables self.update() File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\optlang\gurobi_interface.py", line 666, in update super(Model, self).update(callback=self.problem.update) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\optlang\interface.py", line 1464, in update self._add_constraints(add_constr) File "C:\Users\vkoselka\AppData\Local\anaconda3\envs\cnapy-1.2.2\lib\site-packages\optlang\gurobi_interface.py", line 723, in _add_constraints self.problem.addConstr(lhs, sense, rhs, name=constraint.name) File "src\gurobipy\_model.pyx", line 3894, in gurobipy._model.Model.addConstr TypeError: addConstr() takes at most 3 positional arguments (4 given)
The text was updated successfully, but these errors were encountered: