[X] 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.
🔍 Description of the bug
When aplot and vplot commands are executed, following error is generated since pyvista 0.39.0
mapdl.aplot()
CRITICAL - pymapdl_global - logging - handle_exception - Uncaught exception
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "...\venv_\lib\site-packages\ansys\mapdl\core\mapdl.py", line 1675, in aplot
surf = self.geometry.generate_surface(11 - quality, na1, na2, ninc)
File "...\venv_\lib\site-packages\ansys\mapdl\core\misc.py", line 408, in wrapper
out = func(*args, **kwargs)
File "...\venv_\lib\site-packages\ansys\mapdl\core\misc.py", line 430, in wrapper
out = func(*args, **kwargs)
File "...\venv_\lib\site-packages\ansys\mapdl\core\mapdl_geometry.py", line 297, in generate_surface
grid = self._mapdl.mesh._grid.linear_copy()
File "...\venv_\lib\site-packages\ansys\mapdl\core\mesh_grpc.py", line 706, in _grid
self._grid_cache = self._parse_vtk(force_linear=True)
File "...\venv_\lib\site-packages\ansys\mapdl\core\mesh_grpc.py", line 771, in _parse_vtk
from ansys.mapdl.core.mesh.mesh import _parse_vtk
File "...\venv_\lib\site-packages\ansys\mapdl\core\mesh\mesh.py", line 7, in <module>
from pyvista._vtk import VTK9
ImportError: cannot import name 'VTK9' from 'pyvista._vtk' (...\venv_\lib\site-packages\pyvista\_vtk.py)
🤓 Before submitting the issue
pip install --upgrade --upgrade-strategy eager ansys-mapdl-core
.🔍 Description of the bug
When aplot and vplot commands are executed, following error is generated since pyvista 0.39.0
🕵️ Steps To Reproduce
And I ran the following code:
💻 Which Operating System are you using?
Windows
🐍 Which Python version are you using?
3.10
📝 PyMAPDL Report
Show the Report!
```text ------------------------------------------------------------------------------- PyMAPDL Software and Environment Report Packages Requirements ********************* Core packages ------------- ansys.mapdl.core : 0.64.1 numpy : 1.24.3 appdirs : 1.4.4 scipy : 1.10.1 grpc : Package not found ansys.api.mapdl.v0 : Package not found ansys.mapdl.reader : 0.52.13 google.protobuf : Package not found Optional packages ----------------- matplotlib : 3.7.1 pyvista : 0.39.1 pyiges : 0.2.1 tqdm : 4.65.0 Ansys Installation ****************** Version Location ------------------ 221 C:\Program Files\ANSYS Inc\v221 231 C:\Program Files\ANSYS Inc\v231 232 C:\Program Files\ANSYS Inc\v232 Ansys Environment Variables *************************** ANSYS221_DIR C:\Program Files\ANSYS Inc\v221\ANSYS ANSYS231_DIR C:\Program Files\ANSYS Inc\v231\ANSYS ANSYS232_DIR C:\Program Files\ANSYS Inc\v232\ANSYS ANSYSLIC_DIR C:\Program Files\ANSYS Inc\Shared Files\Licensing ANSYSLMD_LICENSE_FILE 1055@AAPwqLw9xkRfH1A AWP_LOCALE221 en-us AWP_LOCALE232 en-us AWP_ROOT221 C:\Program Files\ANSYS Inc\v221 AWP_ROOT231 C:\Program Files\ANSYS Inc\v231 AWP_ROOT232 C:\Program Files\ANSYS Inc\v232 CADOE_LIBDIR221 C:\Program Files\ANSYS Inc\v221\CommonFiles\Language\en-us CADOE_LIBDIR231 C:\Program Files\ANSYS Inc\v231\CommonFiles\Language\en-us CADOE_LIBDIR232 C:\Program Files\ANSYS Inc\v232\CommonFiles\Language\en-us ```📝 Installed packages
Show the installed packages!
```text ansys-api-mapdl==0.5.1 ansys-api-platform-instancemanagement==1.0.0b3 ansys-mapdl-core==0.64.1 ansys-mapdl-reader==0.52.13 ansys-platform-instancemanagement==1.1.1 appdirs==1.4.4 certifi==2023.5.7 charset-normalizer==3.1.0 click==8.1.3 colorama==0.4.6 contourpy==1.0.7 cycler==0.11.0 fonttools==4.39.4 geomdl==5.3.1 googleapis-common-protos==1.59.0 grpcio==1.54.2 idna==3.4 importlib-metadata==6.6.0 kiwisolver==1.4.4 matplotlib==3.7.1 numpy==1.24.3 packaging==23.1 Pillow==9.5.0 platformdirs==3.5.1 pooch==1.7.0 protobuf==3.20.3 protoc-gen-swagger==0.1.0 psutil==5.9.5 pyansys-tools-versioning==0.3.3 pyiges==0.2.1 pyparsing==3.0.9 python-dateutil==2.8.2 pyvista==0.39.1 requests==2.31.0 scipy==1.10.1 scooby==0.7.2 six==1.16.0 tqdm==4.65.0 urllib3==2.0.2 vtk==9.2.6 zipp==3.15.0 ```📝 Logger output file
Show the logger output file.
```text =============================================================================== NEW SESSION - 06/01/2023, 11:12:50 =============================================================================== LEVEL - INSTANCE NAME - MODULE - FUNCTION - MESSAGE DEBUG - pymapdl_global - launcher - launch_mapdl - Using default port 50052 DEBUG - pymapdl_global - launcher - launch_mapdl - Using 'start_instance' equal to True DEBUG - pymapdl_global - launcher - launch_mapdl - Using default executable. DEBUG - pymapdl_global - launcher - launch_mapdl - Using default run location. DEBUG - pymapdl_global - launcher - launch_mapdl - Created run location at C:\Users\pvargas_\AppData\Local\Temp\ansys_zyzcuhtdnm DEBUG - pymapdl_global - launcher - launch_mapdl - Using run location at C:\Users\pvargas_\AppData\Local\Temp\ansys_zyzcuhtdnm DEBUG - pymapdl_global - launcher - check_lock_file - Checking for lock file DEBUG - pymapdl_global - launcher - launch_mapdl - Using mode grpc DEBUG - pymapdl_global - launcher - _validate_MPI - Forcing Microsoft MPI (MSMPI) to avoid VPN issues. DEBUG - pymapdl_global - launcher - launch_mapdl - Using additional switches -mpi msmpi. DEBUG - pymapdl_global - launcher - launch_mapdl - Using start parameters {'exec_file': 'C:\\Program Files\\ANSYS Inc\\v221\\ansys\\bin\\winx64\\ansys221.exe', 'run_location': 'C:\\Users\\pvargas_\\AppData\\Local\\Temp\\ansys_zyzcuhtdnm', 'additional_switches': ' -mpi msmpi', 'jobname': 'file', 'nproc': 2, 'print_com': False, 'ram': None, 'override': False, 'timeout': 45} DEBUG - pymapdl_global - launcher - launch_mapdl - Checking license server. DEBUG - pymapdl_global - launcher - launch_mapdl - Starting MAPDL DEBUG - pymapdl_global - launcher - launch_grpc - Starting 'launch_mapdl'. DEBUG - pymapdl_global - launcher - check_lock_file - Checking for lock file DEBUG - pymapdl_global - launcher - launch_grpc - Writing temporary input file: .__tmp__.inp with 'FINISH' command. DEBUG - pymapdl_global - launcher - launch_grpc - Starting MAPDL with command: "C:\Program Files\ANSYS Inc\v221\ansys\bin\winx64\ansys221.exe" -j file -np 2 -b -i .__tmp__.inp -o .__tmp__.out -mpi msmpi -port 50052 -grpc INFO - pymapdl_global - launcher - launch_grpc - Running in 127.0.0.1:50052 the following command: '"C:\Program Files\ANSYS Inc\v221\ansys\bin\winx64\ansys221.exe" -j file -np 2 -b -i .__tmp__.inp -o .__tmp__.out -mpi msmpi -port 50052 -grpc' DEBUG - pymapdl_global - launcher - launch_grpc - MAPDL starting in background. DEBUG - pymapdl_global - launcher - launch_grpc - Generating queue object for stdout DEBUG - pymapdl_global - launcher - launch_grpc - Checking process is alive DEBUG - pymapdl_global - launcher - launch_grpc - Checking file error is created DEBUG - pymapdl_global - licensing - _check_license_file_iterator - Output from C:\Users\pvargas_\AppData\Local\Temp\.ansys\licdebug.AAPwqLw9xkRfH1A.FEAT_ANSYS.221.out: 2023/06/01 11:12:55 INFO Starting Licensing Client Proxy server. DEBUG - pymapdl_global - licensing - _check_license_file_iterator - Output from C:\Users\pvargas_\AppData\Local\Temp\.ansys\licdebug.AAPwqLw9xkRfH1A.FEAT_ANSYS.221.out: 2023/06/01 11:12:55 INFO C:\Program Files\ANSYS Inc\v221\licensingclient\winx64\ansyscl.exe -acl 20064.81934 -nodaemon -log C:\Users\pvargas_\AppData\Local\Temp\.ansys\ansyscl.AAPwqLw9xkRfH1A.20064.81934.log DEBUG - pymapdl_global - licensing - _check_license_file_iterator - Output from C:\Users\pvargas_\AppData\Local\Temp\.ansys\licdebug.AAPwqLw9xkRfH1A.FEAT_ANSYS.221.out: 2023/06/01 11:12:55 INFO Started ANSYSLI server. DEBUG - pymapdl_global - launcher - _check_file_error_created - MAPDL session successfully started (Error file found) DEBUG - GRPC_127.0.0.1:50052 - mapdl - __init__ - Logging set to DEBUG DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - __init__ - Creating channel to 127.0.0.1:50052 DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - _create_channel - Opening insecure channel at 127.0.0.1:50052 DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - _multi_connect - Connection attempt 1 DEBUG - pymapdl_global - licensing - _check_license_file_iterator - PyMAPDL is taking longer than expected to connect to an MAPDL session. Checking if there are any available licenses... DEBUG - pymapdl_global - licensing - _check_license_file_iterator - Output from C:\Users\pvargas_\AppData\Local\Temp\.ansys\licdebug.AAPwqLw9xkRfH1A.FEAT_ANSYS.221.out: 2023/06/01 11:12:56 CLIENT_CONNECT 1/1/1/1 20064:FEAT_ANSYS:pvargas_@AAPwqLw9xkRfH1A.win.ansys.com:winx64 6936:192.168.1.70 DEBUG - pymapdl_global - licensing - _check_license_file_iterator - Output from C:\Users\pvargas_\AppData\Local\Temp\.ansys\licdebug.AAPwqLw9xkRfH1A.FEAT_ANSYS.221.out: 2023/06/01 11:12:56 NEW_CONNECTION Connected to Licensing Client Proxy server: 55335@127.0.0.1. DEBUG - pymapdl_global - licensing - _check_license_file_iterator - Output from C:\Users\pvargas_\AppData\Local\Temp\.ansys\licdebug.AAPwqLw9xkRfH1A.FEAT_ANSYS.221.out: 2023/06/01 11:12:56 CHECKOUT ansys 22.1 (2021.1108) 1/1/1/10 1/1/1/1 20064:FEAT_ANSYS:pvargas_@AAPwqLw9xkRfH1A.win.ansys.com:winx64 6936:192.168.1.70 DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - _connect - Established connection to MAPDL gRPC DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - __init__ - Attached MAPDL object to MapdlMesh. DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Caching routine Begin level DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Restoring routine Begin level DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - _multi_connect - Connected DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - __init__ - Connection established DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - PARAMETER = C:\Users\pvargas_\AppData\Local\Temp\ansys_zyzcuhtdnm DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - PARAMETER = C:\Users\pvargas_\AppData\Local\Temp\ansys_zyzcuhtdnm DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - PARAMETER = C:\Users\pvargas_\AppData\Local\Temp\ansys_zyzcuhtdnm DEBUG - pymapdl_global - launcher - launch_mapdl - Stopping license server check. DEBUG - pymapdl_global - licensing - is_connected - PyMAPDL has connected to a MAPDL session. DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - *** ANSYS - ENGINEERING ANALYSIS SYSTEM RELEASE 2022 R1 22.1 *** DISTRIBUTED Ansys Mechanical Enterprise 00000000 VERSION=WINDOWS x64 11:12:57 JUN 01, 2023 CP= 0.078 ***** ANSYS ANALYSIS DEFINITION (PREP7) ***** DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - KEYPOINT 1 X,Y,Z= 0.00000 0.00000 0.00000 IN CSYS= 0 DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - KEYPOINT 2 X,Y,Z= 1.00000 0.00000 0.00000 IN CSYS= 0 DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - KEYPOINT 3 X,Y,Z= 1.00000 1.00000 0.00000 IN CSYS= 0 DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - DEFINE AREA BY LIST OF KEYPOINTS KEYPOINT LIST = 1 2 3 AREA NUMBER = 1 DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Entering force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - *GET __FLOATPARAMETER__ FROM AREA ITEM=COUN VALUE= 1.00000000 DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Exiting force-output mode DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Entering non-interactive mode DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Exiting non-interactive mode DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - _flush_stored - Flushing stored commands DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - _flush_stored - Writing the following commands to a temporary apdl input file: CM,__tmp_elem__, ELEM CM,__tmp_area__, AREA DEBUG - GRPC_127.0.0.1:50052 - mapdl_grpc - input - Using python working directory as 'dir_' value. DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - PARAMETER = C:\Users\pvargas_\AppData\Local\Temp\ansys_zyzcuhtdnm INFO - GRPC_127.0.0.1:50052 - mapdl_grpc - _flush_stored - *** NOTE *** CP = 0.078 TIME= 11:13:06 The component definition of __TMP_ELEM__ contains no data. DEFINITION OF COMPONENT = __TMP_ELEM__ ENTITY=ELEM DEFINITION OF COMPONENT = __TMP_AREA__ ENTITY=AREA DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Entering force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - *GET __FLOATPARAMETER__ FROM AREA ITEM=COUN VALUE= 1.00000000 DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Exiting force-output mode DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Entering force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - *GET __FLOATPARAMETER__ FROM AREA ITEM=NUM MAXD VALUE= 1.00000000 DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Exiting force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Entering force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - *GET __FLOATPARAMETER__ FROM AREA ITEM=NUM MAXD VALUE= 2.00000000 DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Exiting force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Entering force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - *GET __FLOATPARAMETER__ FROM AREA ITEM=COUN VALUE= 1.00000000 DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Exiting force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Entering force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - *GET __FLOATPARAMETER__ FROM ETYP ITEM=NUM MAX VALUE= 0.00000000 DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Exiting force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - GENERATE NODES AND ELEMENTS IN ALL SELECTED AREAS ** AREA 2 MESHED WITH 22 QUADRILATERALS, 1 TRIANGLES ** NUMBER OF AREAS MESHED = 1 MAXIMUM NODE NUMBER = 34 MAXIMUM ELEMENT NUMBER = 23 DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - SELECT ELEMENTS CREATED FROM SELECTED AREAS. 23 ELEMENTS (OF 23 DEFINED) SELECTED FROM 1 SELECTED AREAS BY ESLA COMMAND. DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _update_cache - Updating cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mapdl - __enter__ - Entering force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _reset_cache - Resetting cache INFO - GRPC_127.0.0.1:50052 - mapdl - run - *GET __FLOATPARAMETER__ FROM ELEM ITEM=COUN VALUE= 23.0000000 DEBUG - GRPC_127.0.0.1:50052 - mapdl - __exit__ - Exiting force-output mode DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _update_cache_element_desc - Updating elements (desc) cache DEBUG - GRPC_127.0.0.1:50052 - mesh_grpc - _update_cache_nnum - Updating nodes cache CRITICAL - pymapdl_global - logging - handle_exception - Uncaught exception Traceback (most recent call last): File "