I have problem in msh2vtu

When I enter this code in cmd:
python msh2vtu.py --ogs --rdcd 1234.msh
1234.msh is my msh name
I get the following error:
AttributeError: ‘Mesh’ object has no attribute ‘remove_orphaned_nodes’
What is the solution?

Seems like version mismatch (in some version of meshio, a package msh2vtu relies on, meshmodifying functions were to be shifted to a separate package, and msh2vtu can handle this from some version on).
Would you post the mesh and I will take a look?

my mesh is 3D and i want convert to 7 vtu

I need the msh- or geo-file.

Please send me your email to help me

Dear @mohammad I elevated your permission so that you can directly upload here.

this is my files location URL
i also run your example file(geolayer_2d.msh) with msh2vtu but encounter the seem error

geolayer_2d.msh runs without error on my computer.
With 321.msh I obtain a warning, that there are some nodes out of the domain mesh, may be some leftovers from intermediate steps, anyway
the results 321_dk.zip (1.4 MB)
look good at first glance.
For comparison, these are my versions
gmsh 4.10.5
msh2vtu 0.0.3
meshio 5.3.4 (Python 3.10.6)

Thank you for your help
Why is it a problem for me, even the examples of the software itself do not run correctly
I also checked the versions and they are correct
How can I install msh2vtu? I installed it locally
Can you tell me the steps you took?

I am afraid, of course the examples should run correctly.
Probably some compatibility problems, I did not account for.
It would be interesting to see your local system.
Anyway, the installation should work like
If not, then I will have to work on it.

I first installed gmsh and meshio, but I wanted to install msh2vtu by pip install msh2vtu, it gave an error, the error was as follows
ERROR: Could not find a version that satisfies the requirement msh2vtu (from versions: none)
ERROR: No matching distribution found for msh2vtu
which I installed locally (pip install -e).
Then I converted the geo file to msh and in mcd
I typed this: python msh2vtu0py --ogs --rdcd
But I faced an error again.
Is it necessary to install Python virtual environment?

msh2vtu is now part of ogstools. You can install it with

pip install ogstools

See also the docs mentioned above.

Virtual environment is not needed, but generally it helps to handle dependencies: project A may depend on version X of an external package, while project B depends on version Y of the same package. Without virtual environment you may have either version X or Y, but not both at a time.
Anyway, if you only want to get msh2vtu run and have no ongoing developments, then you get along without virtual environments.

So what’s the problem that it doesn’t run on my computer?

It also gives this error:
int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’

Please provide full log or command output. Otherwise we are not able to help.

This is the whole report it gives me:
Newer version of Meshio than supported. Backward compatibility may be missing!

Traceback (most recent call last):
File “C:\Users\user\OneDrive\Desktop\321\msh2vtu\msh2vtu\msh2vtu.py”, line 187, in
mesh = meshio.read(args.filename)
File “C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\meshio_helpers.py”, line 71, in read
return _read_file(Path(filename), file_format)
File “C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\meshio_helpers.py”, line 103, in _read_file
return reader_mapfile_format
File “C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\meshio\gmsh\main.py”, line 19, in read
mesh = read_buffer(f)
File “C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\meshio\gmsh\main.py”, line 48, in read_buffer
return reader.read_buffer(f, is_ascii, data_size)
File “C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\meshio\gmsh_gmsh22.py”, line 59, in read_buffer
has_additional_tag_data, cell_tags = _read_cells(
File “C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\meshio\gmsh_gmsh22.py”, line 135, in _read_cells
point_tags = np.asarray(point_tags, dtype=np.int32) - 1
TypeError: int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’

Excuse me, can you record the process of installing msh2vtu and running it from zero to hundred so that I can see where the problem is?
I can’t find the problem no matter what I do

On Linux, e.g. Ubuntu, I would run

sudo apt install python3
pip install ogstools

about Windows I cannot say anything.