Skip to content

Commit

Permalink
Display attribute_error with msg_error (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy authored Aug 14, 2024
1 parent 4a00b6e commit 9853f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Plugin/src/SofaPython3/SceneLoaderPY3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void SceneLoaderPY3::loadSceneWithArguments(const char *filename,
ss << "Unable to completely load the scene from file '"<< filename << "'." << msgendl
<< "Python exception: " << msgendl
<< " " << e.what();
if( py::isinstance(e.type(), py::eval("type(DeprecationWarning)")) )
if( py::isinstance(e.type(), py::eval("type(DeprecationWarning)")) && !py::isinstance(e.type(), py::eval("type(AttributeError)")))
{
msg_deprecated() << ss.str();
}else
Expand Down

0 comments on commit 9853f11

Please sign in to comment.