Hello,
I want to call pvbatch.exe
(on Windows) to create a VTU file, since I use a GUI, I don’t want to block during the process. So, I use the below code:
args = [PARAVIEW_PATH, input_file_path]
print(args)
self.paraview_process = subprocess.Popen(args)
It works well with usual paths, but if the input_file_path
contains a Japanese character, I got the below error:
['C:/Program Files/ParaView 5.9.1-Windows-Python3.8-msvc2017-64bit/bin/pvbatch.exe', 'C:\\Users\\arnaud\\Source\\Repos\\geoinfo\\src\\results\\20220102115342ワーク\\make_vtu_test_sample_temperature_20220102115342ワーク.py']
C:/Program Files/ParaView 5.9.1-Windows-Python3.8-msvc2017-64bit/bin\vtkpython: can't open file 'C:\Users\arnaud\Source\Repos\geoinfo\src\results\20220102115342���[�N\make_vtu_test_sample_temperature_20220102115342���[�N.py': [Errno 2] No such file or directory
I report this problem as a bug (see issue link below), but it seems to be a Windows problem.
https://gitlab.kitware.com/paraview/paraview/-/issues/21144
I use Python 3.7 and ParaView 5.9.1 or ParaView 5.10.0-RC1.
If I use below code:
args = [PARAVIEW_PATH.encode(), input_file_path.encode()]
print(args)
self.paraview_process = subprocess.Popen(args)
I get: a bytes-like object is required, not 'str'
.
Does anyone know how I can solve this problem ?
Thank you