calfem-python icon indicating copy to clipboard operation
calfem-python copied to clipboard

Exception: 'C:\Users\OZY~1.OZK\AppData\Local\Temp\tmp3_8p2440\tempGeometry.geo', line 0: syntax error (}) error when using mesh.create()

Open OzyOzk opened this issue 1 year ago • 2 comments

Hi all,

I've just started to use Calfem and I'm trying to understand the meshing functions. I've got an L shaped polygon that I want to generate a mesh for, but I keep getting a syntax error when I try.

Traceback (most recent call last):
  File "C:\repositories\b-n\examples\build_mesh.py", line 109, in <module>
    main()
  File "C:\repositories\b-n\examples\build_mesh.py", line 98, in main
    mesh = cfm.createMesh(g)
           ^^^^^^^^^^^^^^^^^
  File "C:\repositories\b-n\venv\Lib\site-packages\calfem\mesh.py", line 105, in createGmshMesh
    return meshGen.create()
           ^^^^^^^^^^^^^^^^
  File "C:\repositories\b-n\venv\Lib\site-packages\calfem\mesh.py", line 367, in create
    gmsh.open(geoFilePath)
  File "C:\repositories\b-n\venv\Lib\site-packages\gmsh.py", line 341, in open
    raise Exception(logger.getLastError())
Exception: 'C:\Users\OZY~1.OZK\AppData\Local\Temp\tmpuedlddtu\tempGeometry.geo', line 0: syntax error (})

I also get the following message every time I run my script;

Could not import Matplotlib backends. Probarbly due to missing Qt.

I don't think it's relevant though

OzyOzk avatar May 08 '24 13:05 OzyOzk

I need an test example to be able to test.

jonaslindemann avatar May 13 '24 20:05 jonaslindemann

Hi again,

I've managed to resolve the issue by increasing the element size. I will post the sample of code that produces the problem soon.

OzyOzk avatar May 30 '24 13:05 OzyOzk