SystemError:<内置函数=“” routingmodel_solvewithparameters =“”>

时间:2019-04-01 21:50:33

标签: python-3.x or-tools

我正在使用Python3.7.0来跟踪example,但是出现以下错误:

编辑 我正在使用ortools Version: 7.0.6546

RuntimeError: SWIG std::function invocation failed.

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

Traceback (most recent call last):
  File "C:\Users\aenaya\AppData\Local\Programs\Python\Python37\lib\site-packages\ortools\constraint_solver\pywrapcp.py", line 2136, in <lambda>
    __setattr__ = lambda self, name, value: _swig_setattr(self, Assignment, name, value)
  File "C:\Users\aenaya\AppData\Local\Programs\Python\Python37\lib\site-packages\ortools\constraint_solver\pywrapcp.py", line 71, in _swig_setattr
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)
  File "C:\Users\aenaya\AppData\Local\Programs\Python\Python37\lib\site-packages\ortools\constraint_solver\pywrapcp.py", line 55, in _swig_setattr_nondynamic
    if type(value).__name__ == 'SwigPyObject':
SystemError: <class 'type'> returned a result with an error set

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

Traceback (most recent call last):
  File "E:\cidy.ai\delivery-app\test.py", line 68, in <module>
    run()
  File "E:\cidy.ai\delivery-app\test.py", line 59, in run
    assignment = routing.SolveWithParameters(search_parameters)
  File "C:\Users\aenaya\AppData\Local\Programs\Python\Python37\lib\site-packages\ortools\constraint_solver\pywrapcp.py", line 3425, in SolveWithParameters
    return _pywrapcp.RoutingModel_SolveWithParameters(self, search_parameters, solutions)
SystemError: <built-in function RoutingModel_SolveWithParameters> returned a result with an error set

请问您能理解这个问题吗?

0 个答案:

没有答案