[python, c++] Fix misleading DoesNotExistErrors
in open
factory
#7162
Loading
DoesNotExistErrors
in open
factory
#7162