meshmagick icon indicating copy to clipboard operation
meshmagick copied to clipboard

Getting Python error when calling meshmagick.hydrostatics.Hidrostatics()

Open joaoantoniocardoso opened this issue 3 years ago • 2 comments

Hi, first I want to say thank you to the developer and contributors of this software/package, I was just looking for a way for computing hydrostatics from Python and finally found it! :smile:

Well, I just executed some of the example lines from cli mentioned in the documentation and all worked fine.

But then I moved to the Python package, but I am facing some trouble here. I tried with both python2.7 and python3.8 using a fresh virtualenv/venv, installing it by running
pip install https://github.com/LHEEA/meshmagick/archive/master.zip.

Minimal example

from meshmagick import mmio, hydrostatics
mesh = mmio.load_VTP("./meshmagick/tests/data/SEAREV.vtp")
hydrostatics.Hydrostatics(mesh)

and got:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "meshmagick/hydrostatics.py", line 143, in __init__
    self.backup['init_mesh'] = working_mesh.copy()
AttributeError: 'tuple' object has no attribute 'copy'

Let me know If you need more information or some help, I am a developer too and I am open to contribute to open source projects :+1:

Thank you!

joaoantoniocardoso avatar Feb 03 '21 23:02 joaoantoniocardoso