Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

geom = pg.built_in.Geometry() and the it says there is no attribute "built_in"

I’m trying to update a code done in 2018 (not by me) and i fell on geom = pg.built_in.Geometry() and it says there is no attribute "built_in".

import pygmsh as pg
geom = pg.built_in.Geometry()
AttributeError: module 'pygmsh' has no attribute 'built_in'

How is the updated version, or is there anything else I can do?

While looking on the internet I found a few changes that didn’t even work,
Like using geom = pg.Geometry() straight

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

built_in was removed in pygmsh 7.* versions. Try

import pygmsh

with pygmsh.geo.Geometry() as geom:
    ...
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading