diff --git a/openmc/mesh.py b/openmc/mesh.py index 1372c5196e..e024710b48 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -699,7 +699,7 @@ class RegularMesh(StructuredMesh): # write the .vtk file writer = vtk.vtkStructuredGridWriter() - writer.SetFileName(filename) + writer.SetFileName(str(filename)) writer.SetInputData(vtk_grid) writer.Write()