Commit 8adef2c7 by Boris Staletic Committed by GitHub

fix: workaround for #2682 and #2422 by simply clearing the TypeError (#2685)

parent 087b07c8
......@@ -1870,7 +1870,14 @@ private:
#if !defined(NDEBUG)
, type(type_id<T>())
#endif
{ }
{
// Workaround! See:
// https://github.com/pybind/pybind11/issues/2336
// https://github.com/pybind/pybind11/pull/2685#issuecomment-731286700
if (PyErr_Occurred()) {
PyErr_Clear();
}
}
public:
/// Direct construction with name, default, and description
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment