未验证 提交 a138b6cd 编写于 作者: W wanghuancoder 提交者: GitHub

fix import paddle error in windows for python3.8 and python3.9, test=develop (#33617)

上级 67bec55c
...@@ -984,12 +984,11 @@ void InitOpsAttrTypeMap() { ...@@ -984,12 +984,11 @@ void InitOpsAttrTypeMap() {
} }
} }
PyObject* EOFExceptionException =
PyErr_NewException("paddle.EOFException", PyExc_Exception, NULL);
PyObject* EnforceNotMetException =
PyErr_NewException("paddle.EnforceNotMet", PyExc_Exception, NULL);
void ThrowExceptionToPython(std::exception_ptr p) { void ThrowExceptionToPython(std::exception_ptr p) {
static PyObject* EOFExceptionException =
PyErr_NewException("paddle.EOFException", PyExc_Exception, NULL);
static PyObject* EnforceNotMetException =
PyErr_NewException("paddle.EnforceNotMet", PyExc_Exception, NULL);
try { try {
if (p) std::rethrow_exception(p); if (p) std::rethrow_exception(p);
} catch (const platform::EOFException& e) { } catch (const platform::EOFException& e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册