简体   繁体   中英

TypeError with docplex 2.10.15x

After switching from docplex 2.9.141 to version 2.10.150 (same with 2.10.151) I started having the following error when trying to call solve on my model (using my docloud credentials).

I expect that this problem is caused by the fact that the class ProgressData has been changed to a namedtuple subclass and no longer has default attribute values.

  File ".../venv/lib/python3.7/site-packages/docplex/mp/model.py", line 4018, in solve
    return self._solve_cloud(context, lex_mipstart)
  File ".../venv/lib/python3.7/site-packages/docplex/mp/model.py", line 4227, in _solve_cloud
    new_solution = docloud_engine.solve(self, parameters=parameters, lex_mipstart=lex_mipstart)
  File ".../venv/lib/python3.7/site-packages/docplex/mp/docloud_engine.py", line 632, in solve
    info_to_monitor={'jobid', 'progress'})
  File ".../venv/lib/python3.7/site-packages/docplex/mp/docloud_connector.py", line 251, in submit_model_data
    info_to_monitor=info_to_monitor)
  File ".../venv/lib/python3.7/site-packages/docplex/mp/docloud_connector.py", line 442, in wait_for_completion
    loop.start(**kwargs)
  File ".../venv/lib/python3.7/site-packages/docplex/mp/utils.py", line 688, in start
    self.scheduler.run()
  File "/opt/anaconda/lib/python3.7/sched.py", line 151, in run
    action(*argument, **kwargs)
  File ".../venv/lib/python3.7/site-packages/docplex/mp/utils.py", line 673, in <lambda>
    lambda a: self._process_task(a), (task.id,))
  File ".../venv/lib/python3.7/site-packages/docplex/mp/utils.py", line 678, in _process_task
    task.action(*task.argument)
  File ".../venv/lib/python3.7/site-packages/docplex/mp/docloud_connector.py", line 373, in progress_poll
    progress_data = self.map_job_info_to_progress_data(info)
  File ".../venv/lib/python3.7/site-packages/docplex/mp/docloud_connector.py", line 485, in map_job_info_to_progress_data
    pg = ProgressData()
TypeError: __new__() missing 10 required positional arguments: 'id', 'has_incumbent', 'current_objective', 'best_bound', 'mip_gap', 'current_nb_iterations', 'current_nb_nodes', 'remaining_nb_nodes', 'time', and 'det_time'

Is this a bug that has been introduced in the new version or could I be doing anything wrong?

这是一个错误-我将尽快修复

docplex 2.10.154 should fix this. Can you please update and try again ? And sorry for the inconvenience.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM