ansys / pymapdl

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

bug in cmgrp #2150

Closed aukselis-c1connections closed 1 year ago

aukselis-c1connections commented 1 year ago

πŸ€“ Before submitting the issue

πŸ” Description of the bug

Using the latest ansys-mapdl-core 0.65.0 I have an error while trying to use cmgrp command. This is because in file (https://github.com/ansys/pymapdl/tree/main/src/ansys/mapdl/core/_commands/database/components.py line 195 name 'oper' is not defined.

According to https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/ans_cmd/Hlp_C_CMGRP.html?q=cmgrp there should be no 'oper' passed in.

πŸ•΅οΈ Steps To Reproduce

the error is clear in the code no reproduction steps are needed.

πŸ’» 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.65.0 numpy : 1.25.0 appdirs : 1.4.4 scipy : 1.10.1 grpc : Package not found ansys.api.mapdl.v0 : Package not found ansys.mapdl.reader : 0.52.11 google.protobuf : Package not found

Optional packages

matplotlib : 3.7.1 pyvista : 0.38.6 pyiges : 0.2.1 tqdm : 4.65.0

Ansys Installation


Version Location

231 C:\Program Files\ANSYS Inc\v231

Ansys Environment Variables


ANSYS231_DIR C:\Program Files\ANSYS Inc\v231\ANSYS AWP_LOCALE231 en-us AWP_ROOT231 C:\Program Files\ANSYS Inc\v231 CADOE_LIBDIR231 C:\Program Files\ANSYS Inc\v231\CommonFiles\Language\en-us

πŸ“ Installed packages

aiohttp==3.8.4 aiosignal==1.3.1 alabaster==0.7.13 ansys-api-fluent==0.3.12 ansys-api-mapdl==0.5.1 ansys-api-mechanical==0.1.0 ansys-api-meshing-prime==0.1.1 ansys-api-platform-instancemanagement==1.0.0b3 ansys-api-systemcoupling==0.1.0 ansys-dpf-composites==0.2.0 ansys-dpf-core==0.8.1 ansys-dpf-gate==0.3.1 ansys-dpf-gatebin==0.3.1 ansys-dpf-post==0.4.0 ansys-fluent-core==0.15.0 ansys-grantami-bomanalytics==1.1.3 ansys-grantami-bomanalytics-openapi==1.0.0 ansys-grpc-dpf==0.7.1 ansys-mapdl-core==0.65.0 ansys-mapdl-reader==0.52.11 ansys-math-core==0.1.1 ansys-mechanical-core==0.8.0 ansys-meshing-prime==0.2.0 ansys-motorcad-core==0.1.3 ansys-openapi-common==1.2.1 ansys-optislang-core==0.2.1 ansys-platform-instancemanagement==1.1.1 ansys-pythonnet==3.1.0rc1 ansys-seascape==0.2.0 ansys-systemcoupling-core==0.1.3 ansys-tools-path==0.2.6 anyio @ file:///C:/ci/anyio_1644481921011/work/dist appdirs==1.4.4 argon2-cffi @ file:///opt/conda/conda-bld/argon2-cffi_1645000214183/work argon2-cffi-bindings @ file:///C:/ci/argon2-cffi-bindings_1644551690056/work arrex==0.5.1 asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work async-timeout==4.0.2 atomicwrites==1.4.0 attrs @ file:///C:/b/abs_09s3y775ra/croot/attrs_1668696195628/work Babel==2.12.1 backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work beautifulsoup4 @ file:///C:/b/abs_0agyz1wsr4/croot/beautifulsoup4-split_1681493048687/work black==23.3.0 bleach @ file:///opt/conda/conda-bld/bleach_1641577558959/work blinker==1.6.2 blosc2==2.0.0 bokeh==2.4.3 cachetools==5.3.0 certifi @ file:///C:/b/abs_4a0polqwty/croot/certifi_1683875377622/work/certifi cffi @ file:///C:/b/abs_49n3v2hyhr/croot/cffi_1670423218144/work charset-normalizer==3.1.0 click==8.1.3 cloudpickle==2.2.1 clr-loader==0.2.5 colorama @ file:///C:/b/abs_a9ozq0l032/croot/colorama_1672387194846/work comm==0.1.3 contourpy==1.0.7 coverage==7.2.3 cryptography==40.0.1 cycler==0.11.0 Cython==0.29.34 darglint==1.8.1 dash==2.9.3 dash-bootstrap-components==1.4.1 dash-core-components==2.0.0 dash-html-components==2.0.0 dash-table==5.0.0 dask==2023.6.0 databind.core==4.4.0 databind.json==4.4.0 debugpy==1.6.7 decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work Deprecated==1.2.14 dill==0.3.6 distributed==2023.6.0 docopt==0.6.2 docspec==2.2.1 docspec-python==2.2.1 docstring-parser==0.11 docutils==0.20.1 entrypoints @ file:///C:/ci/entrypoints_1649926621128/work executing @ file:///opt/conda/conda-bld/executing_1646925071911/work fastapi==0.97.0 fastjsonschema @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_ebruxzvd08/croots/recipe/python-fastjsonschema_1661376484940/work fatpack==0.7.7 ffpack==0.3.3 Flask==2.3.2 fonttools==4.39.3 frozenlist==1.3.3 fsspec==2023.6.0 geomdl==5.3.1 glcontext==2.3.7 google-api-core==2.10.1 google-api-python-client==2.85.0 google-auth==2.17.3 google-auth-httplib2==0.1.0 googleapis-common-protos==1.56.4 grpcio==1.53.0 grpcio-status==1.48.2 h11==0.14.0 h5py==3.8.0 httplib2==0.22.0 idna @ file:///C:/b/abs_bdhbebrioa/croot/idna_1666125572046/work imageio==2.27.0 imagesize==1.4.1 importlib-metadata==6.7.0 importlib-resources==5.12.0 iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work inqbus.rainflow==1.5 intel-openmp==2023.1.0 ipygany==0.5.0 ipykernel==6.23.2 ipython @ file:///C:/b/abs_d1yx5tjhli/croot/ipython_1680701887259/work ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work ipywidgets==8.0.6 itsdangerous==2.1.2 jedi @ file:///C:/ci/jedi_1644315428289/work Jinja2 @ file:///C:/b/abs_7cdis66kl9/croot/jinja2_1666908141852/work jsonschema @ file:///C:/b/abs_6ccs97j_l8/croot/jsonschema_1676558690963/work jupyter-bokeh==2.0.4 jupyter-server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1676473377907/work jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1673615989977/work jupyter_core @ file:///C:/b/abs_9d0ttho3bs/croot/jupyter_core_1679906581955/work jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work jupyterlab-widgets==3.0.7 kiwisolver==1.4.4 line-profiler==4.0.3 llvmlite==0.40.0 locket==1.0.0 lxml==4.9.2 Markdown==3.4.3 MarkupSafe @ file:///C:/ci/markupsafe_1654508077284/work matplotlib==3.7.1 matplotlib-inline @ file:///C:/ci/matplotlib-inline_1661915841596/work mistune @ file:///C:/Users/BUILDE~1/AppData/Local/Temp/abs_081kimkskf/croots/recipe/mistune_1661496225923/work mkl==2023.1.0 mkl-fft==1.3.6 mkl-random @ file:///C:/Users/dev-admin/mkl/mkl_random_1682977971003/work mkl-service==2.4.0 moderngl==5.8.2 mpmath==1.3.0 msgpack==1.0.5 multidict==6.0.4 multiprocess==0.70.14 mypy-extensions==0.4.3 nbclassic @ file:///home/conda/feedstock_root/build_artifacts/nbclassic_1683202085119/work nbclient @ file:///C:/ci/nbclient_1650290387259/work nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert-meta_1683636231832/work nbformat @ file:///C:/b/abs_85_3g7dkt4/croot/nbformat_1670352343720/work nest-asyncio @ file:///C:/b/abs_3a_4jsjlqu/croot/nest-asyncio_1672387322800/work notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1680870634737/work notebook_shim @ file:///home/conda/feedstock_root/build_artifacts/notebook-shim_1682360583588/work nr-date==2.0.0 nr-stream==1.1.5 nr.util==0.8.12 numba==0.57.0 numexpr==2.8.4 numpy==1.25.0 packaging @ file:///C:/b/abs_ed_kb9w6g4/croot/packaging_1678965418855/work pandas==2.0.2 pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work panel==0.14.4 param==1.13.0 parso @ file:///opt/conda/conda-bld/parso_1641458642106/work partd==1.4.0 pathspec @ file:///C:/b/abs_9cu5_2yb3i/croot/pathspec_1674681579249/work pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work Pillow==9.5.0 pipreqs==0.4.13 platformdirs==3.8.0 plotly==5.14.1 pluggy @ file:///C:/ci/pluggy_1648024580010/work plumbum==1.8.1 pooch==1.7.0 prometheus-client @ file:///C:/Windows/TEMP/abs_ab9nx8qb08/croots/recipe/prometheus_client_1659455104602/work prompt-toolkit @ file:///C:/b/abs_6coz5_9f2s/croot/prompt-toolkit_1672387908312/work protobuf==3.20.1 protoc-gen-swagger==0.1.0 psutil==5.9.4 pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work py @ file:///opt/conda/conda-bld/py_1644396412707/work py-cpuinfo==9.0.0 pyaedt==0.6.76 pyansys-tools-versioning==0.3.3 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work pyct==0.5.0 pydantic==1.10.9 pydoc-markdown==4.8.1 PyGLM==2.7.0 Pygments @ file:///C:/b/absfay9dpq4n/croot/pygments_1684279990574/work pyiges==0.2.1 pymadcad==0.15.1 pyparsing==3.0.9 pypiwin32==223 PyQt5==5.15.9 PyQt5-Qt5==5.15.2 PyQt5-sip==12.12.0 pyrsistent @ file:///C:/ci/pyrsistent_1636093225342/work pyspnego==0.8.0 pytest==7.1.2 pytest-cov==4.0.0 python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work pythonnet==3.0.1 pytwin==0.3.0 pytz==2023.3 pyvista==0.38.6 pyviz-comms==2.2.1 pywin32==305.1 pywinpty @ file:///C:/b/abs_73vshmevwq/croot/pywinpty_1677609966356/work/target/wheels/pywinpty-2.0.10-cp39-none-win_amd64.whl PyYAML==6.0 pyzmq @ file:///C:/ci/pyzmq_1657615952984/work rainflow==3.2.0 requests==2.28.2 requests-negotiate-sspi==0.5.2 requests-ntlm==1.2.0 rpyc==5.3.1 rsa==4.9 rust-rainflow-counting @ file:///D:/work_folder/development/rainflow_rust/rainflow_counting scipy==1.10.1 scooby==0.7.1 semantic-version==2.10.0 Send2Trash @ file:///tmp/build/80754af9/send2trash_1632406701022/work setuptools-rust==1.6.0 six @ file:///tmp/build/80754af9/six_1644875935023/work sniffio @ file:///C:/ci/sniffio_1614030527509/work snowballstemmer==2.2.0 sortedcontainers==2.4.0 soupsieve @ file:///C:/b/abs_a989exj3q6/croot/soupsieve_1680518492466/work Sphinx==7.0.1 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work starlette==0.27.0 sympy==1.11.1 tables==3.8.0 tbb==2021.9.0 tblib==1.7.0 tenacity==8.2.2 terminado @ file:///C:/b/abs_25nakickad/croot/terminado_1671751845491/work tinycss2 @ file:///C:/b/abs_52w5vfuaax/croot/tinycss2_1668168823131/work tomli @ file:///C:/Windows/TEMP/abs_ac109f85-a7b3-4b4d-bcfd-52622eceddf0hy332ojo/croots/recipe/tomli_1657175513137/work tomli_w==1.0.0 toolz==0.12.0 tornado @ file:///C:/ci/tornado_1662458743919/work tqdm==4.65.0 traitlets @ file:///C:/b/abs_e5m_xjjl94/croot/traitlets_1671143896266/work traittypes==0.2.1 trame==2.4.2 trame-client==2.7.5 trame-components==2.1.0 trame-deckgl==2.0.1 trame-markdown==2.0.2 trame-matplotlib==2.0.1 trame-plotly==2.1.0 trame-rca==0.3.1 trame-router==2.0.1 trame-server==2.11.0 trame-simput==2.3.1 trame-vega==2.0.2 trame-vtk==2.4.4 trame-vuetify==2.2.4 typeapi==2.0.1 typing_extensions @ file:///C:/b/abs_5em9ekwz24/croot/typing_extensions_1686602003259/work tzdata==2023.3 uritemplate==4.1.1 urllib3==1.26.15 uvicorn==0.22.0 vtk==9.2.6 watchdog==3.0.0 wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work webencodings==0.5.1 websocket-client @ file:///C:/ci/websocket-client_1614804375980/work Werkzeug==2.3.3 widgetsnbextension==4.0.7 wrapt==1.15.0 wslink==1.10.1 xyzservices==2023.2.0 yapf==0.40.1 yarg==0.1.9 yarl==1.9.2 zict==3.0.0 zipp @ file:///C:/b/abs_b9jfdr908q/croot/zipp_1672387552360/work

πŸ“ Logger output file

No response

aukselis-c1connections commented 1 year ago

actually the whole line is incorrect, should be:

command = f"CMGRP,{str(aname)},{str(cnam1)},{str(cnam2)},{str(cnam3)},{str(cnam4)},{str(cnam5)},{str(cnam6)},{str(cnam7)},{str(cnam8)}"  # noqa : E501

instead of:

command = f"CMEDIT,{str(aname)},{str(oper)},{str(cnam1)},{str(cnam2)},{str(cnam3)},{str(cnam4)},{str(cnam5)},{str(cnam6)},{str(cnam7)},{str(cnam8)}"  # noqa : E501