You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the latest version of PyMAPDL and its dependencies (fully updated virtual environment). You can update them using pip install --upgrade --upgrade-strategy eager ansys-mapdl-core in your activated virtual environment.
🔍 Description of the bug
I downloaded the MAPDL 2D Beam Example from the gallery examples here. When I run the script I get this error message:
CRITICAL - pymapdl_global - logging - handle_exception - Uncaught exception
Traceback (most recent call last):
File "D:\Sandbox\mapdl_beam.py", line 15, in <module>
from ansys.mapdl.core import launch_mapdl
File "D:\Sandbox\.venv\lib\site-packages\ansys\mapdl\core\__init__.py", line 62, in <module>
import pyvista
File "D:\Sandbox\.venv\lib\site-packages\pyvista\__init__.py", line 9, in <module>
from pyvista.core import *
File "D:\Sandbox\.venv\lib\site-packages\pyvista\core\__init__.py", line 4, in <module>
from . import _vtk_core
File "D:\Sandbox\.venv\lib\site-packages\pyvista\core\_vtk_core.py", line 28, in <module>
from vtkmodules.numpy_interface.dataset_adapter import (
File "D:\Sandbox\.venv\lib\site-packages\vtkmodules\numpy_interface\dataset_adapter.py", line 388, in <module>
class VTKNoneArray(object):
File "D:\Sandbox\.venv\lib\site-packages\vtkmodules\numpy_interface\dataset_adapter.py", line 170, in decorator
return mcs(cls.__name__, cls.__bases__, body)
File "D:\Sandbox\.venv\lib\site-packages\vtkmodules\numpy_interface\dataset_adapter.py", line 385, in __new__
return type.__new__(mcs, name, parent, attr)
TypeError: 'VTKArrayMetaClass' object is not iterable
🕵️ Steps To Reproduce
""".. _ref_mapdl_beam:MAPDL 2D Beam Example---------------------This is an example from the book *"Finite element analysis using ansys 11.0"*by Paletikrishna Chaitanya, Sambanarajesh Kumar, and Datti Srinivas.PHI Learning Pvt. Ltd., 1 Jan 2010."""################################################################################ Launch MAPDL with interactive plottingfromansys.mapdl.coreimportlaunch_mapdlmapdl=launch_mapdl()
################################################################################ Define an I-beammapdl.prep7()
mapdl.et(1, "BEAM188")
mapdl.keyopt(1, 4, 1) # transverse shear stress output# material propertiesmapdl.mp("EX", 1, 2e7) # N/cm2mapdl.mp("PRXY", 1, 0.27) # Poisson's ratio# beam properties in centimeterssec_num=1mapdl.sectype(sec_num, "BEAM", "I", "ISection", 3)
mapdl.secoffset("CENT")
beam_info=mapdl.secdata(15, 15, 29, 2, 2, 1) # dimensions are in centimeters################################################################################ Create nodes within MAPDLmapdl.n(1, 0, 0, 0)
mapdl.n(12, 110, 0, 0)
mapdl.n(23, 220, 0, 0)
mapdl.fill(1, 12, 10)
mapdl.fill(12, 23, 10)
# list the node coordinatesprint(mapdl.mesh.nodes)
# list the node numbersprint(mapdl.mesh.nnum)
# plot the nodes using VTKmapdl.nplot(vtk=True, nnum=True, cpos="xy", show_bounds=True, point_size=10)
################################################################################ create elements between the nodes# we can just manually create elements since we know that the elements# are sequentialfornodeinmapdl.mesh.nnum[:-1]:
mapdl.e(node, node+1)
# print the elements from MAPDLprint(mapdl.elist())
################################################################################ Access them as a list of arrays# See the documentation on ``mapdl.mesh.elem`` for interpreting the# individual elementsforeleminmapdl.mesh.elem:
print(elem)
################################################################################ Define the boundary conditions# Allow movement only in the X and Z directionforconstin ["UX", "UY", "ROTX", "ROTZ"]:
mapdl.d("all", const)
# constrain just nodes 1 and 23 in the Z directionmapdl.d(1, "UZ")
mapdl.d(23, "UZ")
# apply a -Z force at node 12mapdl.f(12, "FZ", -22840)
################################################################################ run the static analysismapdl.run("/solu")
mapdl.antype("static")
print(mapdl.solve())
################################################################################ Stop mapdl# ~~~~~~~~~~#mapdl.exit()
💻 Which Operating System are you using?
Windows
🐍 Which Python version are you using?
3.8
📝 PyMAPDL Report
Show the Report!
CRITICAL - pymapdl_global - logging - handle_exception - Uncaught exception
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Sandbox\.venv\lib\site-packages\ansys\mapdl\core\__init__.py", line 62, in <module>
import pyvista
File "D:\Sandbox\.venv\lib\site-packages\pyvista\__init__.py", line 9, in <module>
from pyvista.core import *
File "D:\Sandbox\.venv\lib\site-packages\pyvista\core\__init__.py", line 4, in <module>
from . import _vtk_core
File "D:\Sandbox\.venv\lib\site-packages\pyvista\core\_vtk_core.py", line 28, in <module>
from vtkmodules.numpy_interface.dataset_adapter import (
File "D:\Sandbox\.venv\lib\site-packages\vtkmodules\numpy_interface\dataset_adapter.py", line 388, in <module>
class VTKNoneArray(object):
File "D:\Sandbox\.venv\lib\site-packages\vtkmodules\numpy_interface\dataset_adapter.py", line 170, in decorator
return mcs(cls.__name__, cls.__bases__, body)
File "D:\Sandbox\.venv\lib\site-packages\vtkmodules\numpy_interface\dataset_adapter.py", line 385, in __new__
return type.__new__(mcs, name, parent, attr)
TypeError: 'VTKArrayMetaClass' object is not iterable
🤓 Before submitting the issue
pip install --upgrade --upgrade-strategy eager ansys-mapdl-core
in your activated virtual environment.🔍 Description of the bug
I downloaded the MAPDL 2D Beam Example from the gallery examples here. When I run the script I get this error message:
🕵️ Steps To Reproduce
💻 Which Operating System are you using?
Windows
🐍 Which Python version are you using?
3.8
📝 PyMAPDL Report
Show the Report!
📝 Installed packages
Show the installed packages!
📝 Logger output file
Show the logger output file.
The text was updated successfully, but these errors were encountered: