Export to .vtkjs Fails When Filename Contains Spaces

Hi everyone,

I wanted to report a bug I encountered when exporting files to the .vtkjs format using Paraview version 6.0.0.

When I try to export a file and the filename contains a space (for example, my file.vtkjs), the export process fails. An error is thrown, and the resulting file is either empty or not created properly. This issue seems consistent—every time there is a space in the filename or in the path, the export breaks (see below or the specific error).

ERROR: In vtkArchiver.cxx, line 39
vtkArchiver (000001A1BA6E2AF0): Can not create directory "C:\Users\AnisiaLauditi\Desktop\NewFolder\Tryout 3.vtkjs.pvtmp\1"

ERROR: In vtkArchiver.cxx, line 39
vtkArchiver (000001A1BA6F15E0): Can not create directory "C:\Users\AnisiaLauditi\Desktop\NewFolder\Tryout 3.vtkjs.pvtmp\2"


After some trial and error, I found a simple workaround: remove any spaces from the filename before exporting. Replacing spaces with underscores or hyphens (e.g., my_file.vtkjs or my-file.vtkjs) allows the export to complete successfully, and the resulting file is valid.

This might be a minor bug related to how the filename is parsed or passed internally during the export process. It would be great if a future update could either handle spaces correctly or warn the user before exporting.

Hope this helps anyone else who runs into the same issue!

Thanks for sharing the issue along with the reason for it. We’ll see if we can provide an easy fix for it.