ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
423 stars 120 forks source link

Bug with mapdl.use command #1909

Closed ybenaich closed 1 year ago

ybenaich commented 1 year ago

Before submitting the issue

Description of the bug

Firstly the documentation for mapdl.use command is not correct. It seems to be replace in release 0.64 by the lsread apdl command: image It was actually correct in the release 0.63: image

Then, when using the mapdl.use command, the argument type are not anymore supported. For instance: image

Steps To Reproduce

Steps:

And I ran the following code:


from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl()

# Insert your code here

Which Operating System are you using?

Windows

Which Python version are you using?

3.9

PyMAPDL Report

PyMAPDL Software and Environment Report

Packages Requirements


Core packages

ansys.mapdl.core : 0.64.0 numpy : 1.24.2 appdirs : 1.4.4 scipy : 1.10.1 grpc : Package not found ansys.api.mapdl.v0 : Package not found ansys.mapdl.reader : 0.52.9 google.protobuf : Package not found

Optional packages

matplotlib : 3.7.0 pyvista : 0.38.3 pyiges : 0.2.1 tqdm : 4.64.1

Ansys Installation


Version Location

232 C:\Program Files\ANSYS INC\v232

Ansys Environment Variables


ANSYS232_DIR C:\Program Files\ANSYS Inc\v232\ANSYS ANSYS_CONAN_VENV_PATH C:\Users\ybenaich\Documents\AnsysDev\conan_venv AWP_LOCALE232 en-us AWP_ROOT232 C:\Program Files\ANSYS Inc\v232 AWP_THIRDPARTY_DEV C:\Users\ybenaich\Documents\AnsysDev\ThirdParty CADOE_LIBDIR232 C:\Program Files\ANSYS Inc\v232\CommonFiles\Language\en-us

Installed packages

aiofiles==22.1.0 aiosqlite==0.18.0 ansys-api-mapdl==0.5.1 ansys-api-platform-instancemanagement==1.0.0b3 ansys-dpf-core==0.7.3 ansys-dpf-gate==0.3.1 ansys-dpf-gatebin==0.3.1 ansys-dpf-post==0.2.5 ansys-grpc-dpf==0.7.1 ansys-mapdl-core==0.64.0 ansys-mapdl-reader==0.52.9 ansys-platform-instancemanagement==1.0.3 anyio==3.6.2 appdirs==1.4.4 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 asttokens==2.2.1 attrs==22.2.0 Babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.11.2 bleach==6.0.0 cachetools==5.3.0 certifi==2022.12.7 cffi==1.15.1 charset-normalizer==3.0.1 click==8.1.3 colorama==0.4.6 comm==0.1.2 contourpy==1.0.7 cycler==0.11.0 debugpy==1.6.6 decorator==5.1.1 defusedxml==0.7.1 executing==1.2.0 fastjsonschema==2.16.3 fonttools==4.38.0 fqdn==1.5.1 geomdl==5.3.1 google-api-core==2.11.0 google-api-python-client==2.80.0 google-auth==2.16.1 google-auth-httplib2==0.1.0 googleapis-common-protos==1.58.0 grpcio==1.51.3 httplib2==0.21.0 idna==3.4 imageio==2.26.0 importlib-metadata==6.0.0 importlib-resources==5.12.0 ipykernel==6.21.2 ipython==8.11.0 ipython-genutils==0.2.0 isoduration==20.11.0 jedi==0.18.2 Jinja2==3.1.2 json5==0.9.11 jsonpointer==2.3 jsonschema==4.17.3 jupyter-events==0.6.3 jupyter-ydoc==0.2.2 jupyter_client==8.0.3 jupyter_core==5.2.0 jupyter_server==2.3.0 jupyter_server_fileid==0.8.0 jupyter_server_terminals==0.4.4 jupyter_server_ydoc==0.6.1 jupyterlab==3.6.1 jupyterlab-pygments==0.2.2 jupyterlab_server==2.19.0 kiwisolver==1.4.4 MarkupSafe==2.1.2 matplotlib==3.7.0 matplotlib-inline==0.1.6 mistune==2.0.5 nbclassic==0.5.2 nbclient==0.7.2 nbconvert==7.2.9 nbformat==5.7.3 nest-asyncio==1.5.6 notebook==6.5.2 notebook_shim==0.2.2 numpy==1.24.2 packaging==23.0 pandocfilters==1.5.0 parso==0.8.3 pickleshare==0.7.5 Pillow==9.4.0 platformdirs==3.0.0 pooch==1.7.0 prometheus-client==0.16.0 prompt-toolkit==3.0.38 protobuf==3.20.3 protoc-gen-swagger==0.1.0 psutil==5.9.4 pure-eval==0.2.2 pyansys-tools-versioning==0.3.3 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycparser==2.21 Pygments==2.14.0 pyiges==0.2.1 pyparsing==3.0.9 pyrsistent==0.19.3 python-dateutil==2.8.2 python-json-logger==2.0.7 pyvista==0.38.3 pywin32==305 pywinpty==2.0.10 PyYAML==6.0 pyzmq==25.0.0 requests==2.28.2 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rsa==4.9 scipy==1.10.1 scooby==0.7.1 Send2Trash==1.8.0 six==1.16.0 sniffio==1.3.0 soupsieve==2.4 stack-data==0.6.2 terminado==0.17.1 tinycss2==1.2.1 tomli==2.0.1 tornado==6.2 tqdm==4.64.1 traitlets==5.9.0 uri-template==1.2.0 uritemplate==4.1.1 urllib3==1.26.14 vtk==9.2.6 wcwidth==0.2.6 webcolors==1.12 webencodings==0.5.1 websocket-client==1.5.1 y-py==0.5.9 ypy-websocket==0.8.2 zipp==3.15.0

Logger output file

Show the logger output file. ```text # PASTE HERE THE CONTENT OF THE LOGGER OUTPUT FILE. ```
akaszynski commented 1 year ago

@ybenaich, this will be fixed in the next release, but for the time being, please run:

mapdl.use('KRYGENSUB_custom.MAC', arg1=sizek, arg2=shift, arg3=1, arg4=0, arg5="'MatK'", arg6="'MatM'", arg7="'MatC'", arg8="'RHSC'")

Note how we are no longer using name as a keyword argument.

akaszynski commented 1 year ago

@germa89, CI/CD has turned into a monster. I've had to rerun this 4 times...

germa89 commented 1 year ago

Hi @ybenaich As you know this was fixed by email using the same approach noted by @akaszynski

@akaszynski I knoww... :( .... I am thinking about that constantly.

germa89 commented 1 year ago

Fixed in #1910