Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python API Modeler.read() method fails to check if a file can't be read #1037

Open
ktbolt opened this issue Oct 3, 2023 · 0 comments
Open
Assignees
Labels

Comments

@ktbolt
Copy link
Contributor

ktbolt commented Oct 3, 2023

The Python API Modeler.read() method uses the following code to read in a VTP file

  if (model->ReadNative(fileName) != SV_OK) {
      delete model;
      api.error("Error reading a solid model from the file '" + std::string(fileName) + "'.");
      return nullptr;
  }

The SimVascular ReadNative function however does not check to see if the file can be read, just returns SV_OK and an empty vtkPolyData() object.

I will add a check in the Modeler.read() method if a file can be opened.

@ktbolt ktbolt added the bug label Oct 3, 2023
@ktbolt ktbolt self-assigned this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant