unstructured_grids icon indicating copy to clipboard operation
unstructured_grids copied to clipboard

Error on importing paraview generated VTU ascii file

Open tcdoe opened this issue 3 years ago • 1 comments

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!

tcdoe avatar Apr 03 '21 04:04 tcdoe

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.

tkeskita avatar Apr 03 '21 10:04 tkeskita