嵌入时出现Python类型错误

嵌入时出现Python类型错误,python,c++,python-2.7,com,python-embedding,Python,C++,Python 2.7,Com,Python Embedding,我试图从c++运行以下python代码(嵌入python) 当我试图调用can\u start函数时,我得到了python类型的错误。下面提到了错误回溯 "type 'exceptions.TypeError'. an integer is required. traceback object at 0x039A198" 如果我直接从python运行该函数,那么该函数正在执行,并且它也在我的pc中执行,代码就是在pc中开发的。但是后来当我转到另一台笔记本电脑时,我遇到了这个问题。调试这个问题的

我试图从c++运行以下python代码(嵌入python)

当我试图调用
can\u start
函数时,我得到了python类型的错误。下面提到了错误回溯

"type 'exceptions.TypeError'. an integer is required. traceback object at 0x039A198"

如果我直接从python运行该函数,那么该函数正在执行,并且它也在我的pc中执行,代码就是在pc中开发的。但是后来当我转到另一台笔记本电脑时,我遇到了这个问题。

调试这个问题的最简单方法是使用
PyErr\u print()
打印异常。我正在这样做。它说的是“type”exceptions.TypeError。需要一个整数。0x039A198处的回溯对象
"type 'exceptions.TypeError'. an integer is required. traceback object at 0x039A198"