diff --git a/ansys/mapdl/reader/rst.py b/ansys/mapdl/reader/rst.py index 2e90f13f..8e3fb08d 100644 --- a/ansys/mapdl/reader/rst.py +++ b/ansys/mapdl/reader/rst.py @@ -15,7 +15,12 @@ import numpy as np import pyvista as pv from pyvista import _vtk as vtk -from pyvista.themes import DefaultTheme + +try: + from pyvista.themes import DefaultTheme +except ImportError: + from pyvista.plotting.themes import DocumentTheme as DefaultTheme + from tqdm import tqdm from ansys.mapdl.reader import _binary_reader, _reader, elements diff --git a/tests/archive/test_archive.py b/tests/archive/test_archive.py index 23ba18c4..74f7a2ae 100644 --- a/tests/archive/test_archive.py +++ b/tests/archive/test_archive.py @@ -201,7 +201,7 @@ def test_writehex(tmpdir, hex_archive): def test_write_voxel(tmpdir): filename = str(tmpdir.join("tmp.cdb")) - grid = pv.UniformGrid(dimensions=(10, 10, 10)) + grid = pv.ImageData(dimensions=(10, 10, 10)) pymapdl_reader.save_as_archive(filename, grid) archive = pymapdl_reader.Archive(filename)