3DLIRIOUS / MeshLabXML

Create and run MeshLab XML scripts with Python
GNU Lesser General Public License v2.1
201 stars 42 forks source link

Can not run MeshLabXML with Ubuntu 18.04 and Meshlab installed with snap #30

Open SBCV opened 3 years ago

SBCV commented 3 years ago

I've installed meshlab with snap on Ubuntu 18.04 using sudo snap install meshlab --devmode. This creates the meshlabserver executable using the following path /snap/bin/meshlab.meshlabserver. Since my MeshlabServer version is 2020.07, I've used the following script for testing:

os.environ['PATH'] = "/snap/bin/" + os.pathsep + os.environ['PATH']
import meshlabxml as mlx
orange_cube = mlx.FilterScript(file_out='orange_cube.ply', ml_version='2020.07')
mlx.create.cube(orange_cube, size=[3.0, 4.0, 5.0], center=True, color='orange')
mlx.transform.rotate(orange_cube, axis='x', angle=45)
mlx.transform.rotate(orange_cube, axis='y', angle=45)
mlx.transform.translate(orange_cube, value=[0, 5.0, 0])
orange_cube.run_script()

When running this script, I receive the following error message: /bin/sh: 1: meshlabserver: not found Thus, I created a symbolic link from /snap/bin/meshlab.meshlabserver to /snap/bin/meshlabserver. Running the script again throws:

meshlabserver cmd = meshlabserver -i ".../tmpkd4za4nc.xyz" -o "orange_cube.ply" -m vc vn wt -s "/tmp/tmpk5mvuiei.mlx"
***START OF MESHLAB STDOUT & STDERR***
internal error, please report: running "meshlabserver" failed: cannot find current revision for snap meshlabserver: readlink /snap/meshlabserver/current: no such file or directory

Thus my question, is meshlabxml supposed to run with snap? Am I missing something here?

Bests, Sebastian

SBCV commented 3 years ago

Btw: I've noticed that my Meshlab version is not able to read *.mlx files that are located under /tmp/...