Invalid mesh version

Hi,
I have saved a msh file with gmsh-4.4.1, however, the import command fails with invalid mesh version.

$ pyfr import ~/Downloads/gmsh-4.4.1-Linux64/share/doc/gmsh/demos/untitled.msh untitiled.pyfrm

Traceback (most recent call last):
File "/home/mahmood/.local/bin/pyfr", line 11, in <module>
load_entry_point('pyfr==1.8.5', 'console_scripts', 'pyfr')()
File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/__main__.py", line 110, in main
File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/__main__.py", line 121, in process_import
File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/__init__.py", line 19, in get_reader_by_extn
File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 89, in __init__
File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 110, in _read_mesh_format
ValueError: Invalid mesh version

Any idea to fix that?

I always saved mesh file in GMSH version 2 ascii format (it always asks you when you click the save button, maybe there is a way to do that in command lines). As description in the latest PyFR (1.8.5) says, GMSH version 4 should be supported. I’m being lazy didn’t update pyfr yet.

Junting Chen

Hi,

I have saved a msh file with gmsh-4.4.1, however, the import command
fails with invalid mesh version.

Would you be able to provide us with the first few kilobytes of the mesh
you are trying to import (we do not need/want the entire mesh, just the
first few bytes with include the mesh version string).

Regards, Freddie.

Using GUI and export section, I saved with “Version 2 ASCII”, However, it fails with another error

pyfr import untitled.msh untitled.pyfrm Traceback (most recent call last): File "/home/mahmood/.local/bin/pyfr", line 11, in <module> load_entry_point('pyfr==1.8.5', 'console_scripts', 'pyfr')() File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/__main__.py", line 110, in main File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/__main__.py", line 121, in process_import File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/__init__.py", line 19, in get_reader_by_extn File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 89, in __init__ File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 215, in _read_eles File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 227, in _read_eles_impl_v2 ValueError: Unsupported element type 15 head -n 15 untitled.msh
$MeshFormat
2.2 0 8
$EndMeshFormat
$ParametricNodes
67968
1 -1 -0 0 0 1
2 -1 0.2 0 0 2
3 -1.2 0 0 0 3
4 -1 -0.2 0 0 4
5 -0.8 0 0 0 5
6 -1 0.3 0 0 6
7 -1.3 0 0 0 7
8 -1 -0.3 0 0 8
9 -0.7 0 0 0 9
10 -1 0.4 0 0 10

image.png