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

addConstr() takes at most 3 positional arguments (5 given) #215

Open
Ming314 opened this issue Jan 3, 2025 · 0 comments
Open

addConstr() takes at most 3 positional arguments (5 given) #215

Ming314 opened this issue Jan 3, 2025 · 0 comments

Comments

@Ming314
Copy link

Ming314 commented Jan 3, 2025

Hello, CarveMe is a very efficient program, but I have been encountering an error as follows, I consult a lot of information still can not be solved, I look forward to your answer.
My input code: carve -r MAGs_prodigal2/*.faa -o crave_result/ --solver gurobi

Traceback (most recent call last):
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/carveme/cli/carve.py", line 257, in f
maincall(
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/carveme/cli/carve.py", line 204, in maincall
model = carve_model(universe_model, scores, inplace=(not gapfill), default_score=default_score,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/carveme/reconstruction/carving.py", line 233, in carve_model
sol = minmax_reduction(model, scores, default_score=default_score, uptake_score=uptake_score, soft_score=soft_score,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/carveme/reconstruction/carving.py", line 66, in minmax_reduction
solver = solver_instance(model)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/reframed/solvers/init.py", line 104, in solver_instance
return solverssolver
^^^^^^^^^^^^^^^^^^^^^^
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/reframed/solvers/gurobi_solver.py", line 57, in init
self.build_problem(model)
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/reframed/solvers/solver.py", line 99, in build_problem
self.update()
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/reframed/solvers/solver.py", line 80, in update
self.add_constraints(self._cached_constrs)
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/reframed/solvers/gurobi_solver.py", line 72, in add_constraints
self.problem.addConstr(expr, sense_mapping[sense], rhs, constr_id)
File "src/gurobipy/_model.pyx", line 3894, in gurobipy._model.Model.addConstr
TypeError: addConstr() takes at most 3 positional arguments (5 given)
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/ming/miniconda3/envs/GEM/bin/carve", line 8, in
sys.exit(main())
^^^^^^
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/site-packages/carveme/cli/carve.py", line 396, in main
p.starmap(f, [(x, input_type, args.output, args.diamond_args, args.universe, args.universe_file,
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/multiprocessing/pool.py", line 375, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ming/miniconda3/envs/GEM/lib/python3.12/multiprocessing/pool.py", line 774, in get
raise self._value
TypeError: addConstr() takes at most 3 positional arguments (5 given)

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

1 participant