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

huangapple go评论69阅读模式
英文:

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".

我试图更新2018年的代码(不是我写的),我遇到了 geom = pg.built_in.Geometry(),但它显示没有属性"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

在查找互联网时,我找到了一些甚至不起作用的更改,
比如直接使用 geom = pg.Geometry()

英文:

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

答案1

得分: 0

built_inpygmsh 7.* 版本中被移除了。尝试:

import pygmsh

with pygmsh.geo.Geometry() as geom:
    ...
英文:

built_in was removed in pygmsh 7.* versions. Try

import pygmsh

with pygmsh.geo.Geometry() as geom:
    ...

huangapple
  • 本文由 发表于 2023年4月19日 16:03:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76052072.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定