tkeskita/unstructured_grids

Error on importing paraview generated VTU ascii file

tcdoe opened this issue · 1 comments

tcdoe commented

Hi, I tried to import a vtu (asci) file generated in paraview. It is a simple rectangular mesh with stress field values (tension).

But I tried many different methods and what I get is this error:
Traceback (most recent call last):
File "C:\Users\tcd\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\unstructured_grids-master\io_vtu.py", line 67, in execute
n = vtu_to_ugdata(text)
File "C:\Users\tcd\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\unstructured_grids-master\io_vtu.py", line 132, in vtu_to_ugdata
points = get_data_array_block("Points", "float", text)
File "C:\Users\tcd\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\unstructured_grids-master\io_vtu.py", line 190, in get_data_array_block
return get_list_from_text(datablock, vartype)
File "C:\Users\tcd\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\unstructured_grids-master\io_vtu.py", line 203, in get_list_from_text
valuelist.append(eval(command))
File "", line 1
float(<InformationKey)
^
SyntaxError: invalid syntax

Attached is the small vtu file (zipped) for reference.
simpcube_voltest01.zip

Any help greatly appreciated!

Hi,
thanks for data example! It seems that io_vtu is confused about the extra data (InformationKey) entries in your file. If you remove those with e.g. text editor, then you can open the mesh. Please be aware that your data will be discarded.