Skip to content

run() without pyvista leads to an unecessary warning #1152

Closed
@koubaa

Description

@koubaa

using run() without pyvista leads to warning messages

mapdl.run("!comment")
/home/staff/mkoubaa/sites/site4/ansys/mapdl/core/misc.py:1024: UserWarning: To use the method 'geometry', the package 'pyvista' is required.
Please try to install 'pyvista' with:
pip install pyvista
  warn(msg)

 /OUTPUT FILE= anstmp

The reason appears to be the _reset_cache() function in mapdl_grpc.py reads from the mapdl.geometry property which tries to construct a Geometry object that depends on pyvista. I think it can be fixed by mapdl_grpc.py holding a member variable for that is initailized to None and used by the geometry property on first access.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions