usnistgov / fipy

FiPy is a Finite Volume PDE solver written in Python
http://pages.nist.gov/fipy/en/latest
Other
504 stars 148 forks source link

example diffusion.circle error: "No `MeshFormat' header found!" #932

Closed pw13823 closed 1 month ago

pw13823 commented 1 year ago

Hello,

I'm currently running fipy 3.4.3 and Python 3.11.3 and am obtaining the following error when running the example/diffusion/circle.py code as well as the Jupyter version.

I also tested the generic:

"python3 setup.py test --examples" from fipy-master and had the same issue.

And obtain:

env: python: No such file or directory
Traceback (most recent call last):
  File ".../fipy-master/examples/diffusion/circle.py", line 178, in <module>
    exec(fipy.tests.doctestPlus._getScript())
  File "<string>", line 25, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/fipy/meshes/gmshMesh.py", line 1645, in __init__
    self._orderedCellVertexIDs_data) = self.mshFile.read()
                                       ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/fipy/meshes/gmshMesh.py", line 728, in read
    self.version, self.fileType, self.dataSize = self._getMetaData()
                                                 ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/fipy/meshes/gmshMesh.py", line 550, in _getMetaData
    self._seekForHeader("MeshFormat")
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/fipy/meshes/gmshMesh.py", line 588, in _seekForHeader
    raise EOFError("No `%s' header found!" % title) 

This is the case for any examples with gmsh. Any thoughts on how to resolve this? I see there may be an error with python being called instead of python3 but am not certain that's the issue.

Thanks for the help

guyer commented 1 year ago

python3 vs python shouldn't matter

What version of Gmsh do you have installed?

What's your environment? (operating system, how did you install FiPy prerequisites, etc.)