Workflow failed with python packages issue
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Error message:
--------------------------------------------------------------------------- DOcplexException Traceback (most recent call last) <ipython-input-3-54f3aaa54032> in <module> 67 solutione=[] 68 for i in range(0,WEC-16-WSC): ---> 69 solutione.append(round(lp.solution.get_values(('E_{0}').format(i))*(1-OT)/(1-PTO),0)) 70 solutionEt={} 71 for i in range(0,WEC-16-WSC): d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\solution.py in get_values(self, var_seq) 541 """ Same as get_value_list 542 """ --> 543 return self.get_value_list(var_seq) 544 545 def _get_values(self, dvars): d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\solution.py in get_value_list(self, dvars) 533 """ 534 checker = self._checker --> 535 checker.check_ordered_sequence(arg=dvars, 536 caller='SolveSolution.get_values() expects ordered sequence of variables') 537 dvar_seq = checker.typecheck_var_seq(dvars) d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\tck.py in check_ordered_sequence(self, arg, caller, accept_iterator) 545 # but may do unexpected things 546 if not(is_ordered_sequence(arg) or (accept_iterator and is_iterator(arg))): --> 547 self.fatal("{0}, got: {1!s}", caller, type(arg).__name__) 548 549 def check_solution_hook(self, mdl, sol_hook_fn): d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\tck.py in fatal(self, msg, *args) 254 255 def fatal(self, msg, *args): --> 256 self._logger.fatal(msg, args) 257 258 def error(self, msg, *args): # pragma: no cover d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\error_handler.py in fatal(self, msg, args) 208 resolved_message = resolve_pattern(msg, args) 209 docplex_error_stop_here() --> 210 raise DOcplexException(resolved_message) 211 212 def fatal_limits_exceeded(self, nb_vars, nb_constraints): DOcplexException: SolveSolution.get_values() expects ordered sequence of variables, got: str (ToolId: 27)
any suggestions appreciated.
- Labels:
-
Python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Sree2527 I recommend using this start up guide to make sure all correct versions of the requirements are present!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I tried to add /usr/lib/python3/dist-packages/ to the python system path but it causes conflict.
@Sree2527 DGME Employee Login wrote:Error message:
--------------------------------------------------------------------------- DOcplexException Traceback (most recent call last) <ipython-input-3-54f3aaa54032> in <module> 67 solutione=[] 68 for i in range(0,WEC-16-WSC): ---> 69 solutione.append(round(lp.solution.get_values(('E_{0}').format(i))*(1-OT)/(1-PTO),0)) 70 solutionEt={} 71 for i in range(0,WEC-16-WSC): d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\solution.py in get_values(self, var_seq) 541 """ Same as get_value_list 542 """ --> 543 return self.get_value_list(var_seq) 544 545 def _get_values(self, dvars): d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\solution.py in get_value_list(self, dvars) 533 """ 534 checker = self._checker --> 535 checker.check_ordered_sequence(arg=dvars, 536 caller='SolveSolution.get_values() expects ordered sequence of variables') 537 dvar_seq = checker.typecheck_var_seq(dvars) d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\tck.py in check_ordered_sequence(self, arg, caller, accept_iterator) 545 # but may do unexpected things 546 if not(is_ordered_sequence(arg) or (accept_iterator and is_iterator(arg))): --> 547 self.fatal("{0}, got: {1!s}", caller, type(arg).__name__) 548 549 def check_solution_hook(self, mdl, sol_hook_fn): d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\tck.py in fatal(self, msg, *args) 254 255 def fatal(self, msg, *args): --> 256 self._logger.fatal(msg, args) 257 258 def error(self, msg, *args): # pragma: no cover d:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\docplex\mp\error_handler.py in fatal(self, msg, args) 208 resolved_message = resolve_pattern(msg, args) 209 docplex_error_stop_here() --> 210 raise DOcplexException(resolved_message) 211 212 def fatal_limits_exceeded(self, nb_vars, nb_constraints): DOcplexException: SolveSolution.get_values() expects ordered sequence of variables, got: str (ToolId: 27)
any suggestions appreciated.