Skip to content

Unexpected variable in mapdl class #1391

Closed
@germa89

Description

@germa89

Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

Description of the bug

Playing around with DB module, I realised that I cannot edit _server_version method:

>>> from ansys.mapdl.core import launch_mapdl
>>> from ansys.mapdl.core.examples import vmfiles

>>> mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\v212\ansys\bin\winx64\ANSYS212.exe")
>>> mapdl._server_version
(0, 4, 1)

>>> mapdl.__server_version = (1, 1, 1)
>>> mapdl._server_version
(0, 4, 1)

It is weird because the _server_version definition is quite simple.

https://github.com/pyansys/pymapdl/blob/2c4e972e68375b398b6f7c0a2bd24d3436c9f07a/src/ansys/mapdl/core/mapdl_grpc.py#L549-L563

Inspecting the MAPDL object I realized there some weird methods:

image

which are the ones that are being called instead of mapdl.__server_version.

I am not sure why this happening, but there are something going on with _distributed and _server_version. Maybe we are overwriting something?? But I couldn't find out what exactly it is.

Steps To Reproduce

>>> from ansys.mapdl.core import launch_mapdl
>>> from ansys.mapdl.core.examples import vmfiles

>>> mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\v212\ansys\bin\winx64\ANSYS212.exe")
>>> mapdl._server_version
(0, 4, 1)

>>> mapdl.__server_version = (1, 1, 1)
>>> mapdl._server_version
(0, 4, 1)

Which Operating System are you using?

No response

Which Python version are you using?

No response

PyMAPDL Report

-------------------------------------------------------------------------------


PyMAPDL Software and Environment Report


Packages Requirements
*********************

Core packages
-------------
ansys.mapdl.core    : 0.62.dev1
numpy               : 1.22.0
appdirs             : 1.4.4
scipy               : 1.8.0
grpc                : Package not found
ansys.api.mapdl.v0  : Package not found
ansys.mapdl.reader  : 0.52.dev0
google.protobuf     : Package not found

Optional packages
-----------------
matplotlib          : 3.5.1
pyvista             : 0.35.dev0
pyiges              : 0.2.1
tqdm                : 4.62.3


Ansys Installation
******************
Version   Location
------------------
212       C:\Program Files\ANSYS Inc\v212
222       C:\Program Files\ANSYS Inc\ANSYS Student\v222


Ansys Environment Variables
***************************
ANSYS212_DIR                   C:\Program Files\ANSYS Inc\v212\ANSYS
ANSYS222_DIR                   C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS
ANSYSLIC_DIR                   C:\Program Files\ANSYS Inc\Shared Files\Licensing
AWP_LOCALE212                  en-us
AWP_ROOT212                    C:\Program Files\ANSYS Inc\v212
AWP_ROOT222                    C:\Program Files\ANSYS Inc\ANSYS Student\v222
CADOE_LIBDIR212                C:\Program Files\ANSYS Inc\v212\CommonFiles\Language\en-us
CADOE_LIBDIR222                C:\Program Files\ANSYS Inc\ANSYS Student\v222\CommonFiles\Language\en-us

Installed packages


WARNING: Ignoring invalid distribution -nsys-mapdl-reader (c:\programdata\miniconda3\envs\pymapdl_0\lib\site-packages)
aiohttp==3.8.1
aiosignal==1.2.0
alabaster==0.7.12
ansys-api-mapdl==0.5.1
ansys-api-platform-instancemanagement==1.0.0b1
ansys-corba==0.1.0
-e git+https://github.com/pyansys/pydpf-core.git@1e21e317dd02f3a742c48f0052bd50b6f2e7e9fd#egg=ansys_dpf_core
-e git+https://github.com/pyansys/pydpf-post.git@ad8d1dc343a4adc5b4158a9fa019e94158e4da62#egg=ansys_dpf_post
ansys-grpc-dpf==0.4.0
-e git+https://github.com/pyansys/pymapdl.git@2c4e972e68375b398b6f7c0a2bd24d3436c9f07a#egg=ansys_mapdl_core
-e git+https://github.com/pyansys/pymapdl-reader@d835194d46f44db7c2eb77e9bb20390d150cbe9c#egg=ansys_mapdl_reader
ansys-platform-instancemanagement==0.2.0
-e git+https://github.com/ansys/ansys-sphinx-theme.git@ce0099e4a538e827523382c0c39633bcab66fff5#egg=ansys_sphinx_theme
anyio==3.5.0
appdirs==1.4.4
argcomplete==2.0.0
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
async-timeout==4.0.2
atomicwrites==1.4.0
attrs==21.4.0
autobahn==21.11.1
Automat==20.2.0
autopep8 @ file:///opt/conda/conda-bld/autopep8_1639166893812/work
Babel==2.9.1
backcall==0.2.0
beautifulsoup4==4.11.1
bleach==4.1.0
cachetools==4.2.4
certifi==2021.10.8
cffi==1.15.0
cfgv==3.3.1
charset-normalizer==2.0.10
click==8.1.2
codespell==2.1.0
colorama==0.4.4
constantly==15.1.0
coverage==6.2
cryptography==36.0.1
cycler==0.11.0
debugpy==1.5.1
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.4
dnspython==2.2.0
docopt==0.6.2
docutils==0.17.1
entrypoints==0.3
fett==0.3.2
filelock==3.6.0
flake8==3.9.2
fonttools==4.28.5
frozenlist==1.2.0
geomdl==5.3.1
google==3.0.0
google-api-core==2.3.2
google-api-python-client==2.34.0
google-auth==2.3.3
google-auth-httplib2==0.1.0
googleapis-common-protos==1.54.0
grpcio==1.43.0
httplib2==0.20.2
hyperlink==21.0.0
identify==2.4.11
idna==3.3
imageio==2.14.1
imageio-ffmpeg==0.4.5
imagesize==1.3.0
importlib-metadata==4.10.1
incremental==21.3.0
iniconfig==1.1.1
ipycanvas==0.10.2
ipydatawidgets==4.2.0
ipyevents==2.0.1
ipykernel==6.6.1
ipython==7.31.0
ipython-genutils==0.2.0
ipyvtklink==0.2.2
ipywidgets==7.6.5
jedi==0.18.1
Jinja2==3.1.2
json5==0.9.6
jsonschema==4.4.0
jupyter==1.0.0
jupyter-client==7.1.1
jupyter-console==6.4.0
jupyter-core==4.9.1
jupyter-server==1.13.1
jupyter-sphinx==0.3.2
jupyterlab==3.2.8
jupyterlab-pygments==0.1.2
jupyterlab-server==2.10.3
jupyterlab-widgets==1.0.2
kiwisolver==1.3.2
livereload==2.6.3
mapdl @ file:///C:/Program%20Files/ANSYS%20Inc/v212/ANSYS/syslib/ansGRPC/User/mapdl-pyupf.tar.gz
MarkupSafe==2.0.1
matplotlib==3.5.1
matplotlib-inline==0.1.3
mccabe==0.6.1
mistune==0.8.4
mpmath==1.2.1
multidict==5.2.0
nbclassic==0.3.5
nbclient==0.5.10
nbconvert==6.4.0
nbformat==5.1.3
nest-asyncio==1.5.4
networkx==2.6.3
nodeenv==1.6.0
nose==1.3.7
notebook==6.4.7
numpy==1.22.0
numpydoc==1.2
packaging==21.3
pandas==1.4.1
pandocfilters==1.5.0
parso==0.8.3
pickleshare==0.7.5
Pillow==9.0.0
pipx==1.0.0
platformdirs==2.5.1
plotly==5.5.0
pluggy==1.0.0
pre-commit==2.17.0
progressbar2==4.0.0
prometheus-client==0.12.0
prompt-toolkit==3.0.24
protobuf==3.19.1
protoc-gen-swagger==0.1.0
psutil==5.9.1
py==1.11.0
pyansys-sphinx-theme==0.2.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.8.0
pycparser==2.21
pydata-sphinx-theme==0.9.0
pyflakes==2.3.1
Pygments==2.11.2
pyiges==0.2.1
pymongo==3.12.3
pypandoc==1.7.2
pyparsing==3.0.8
pyrsistent==0.18.1
pytest==7.0.1
pytest-cov==3.0.0
pytest-repeat==0.9.1
pytest-sphinx==0.3.1
python-dateutil==2.8.2
python-jsonrpc-server==0.3.4
python-utils==3.3.3
pythreejs==2.3.0
pytz==2021.3
-e git+https://github.com/germa89/pyvista.git@807fa2a83199e05364eb0966b32dcf3b90b5631d#egg=pyvista
pywin32==303
pywinpty==1.1.6
PyYAML==5.4.1
pyzmq==22.3.0
qtconsole==5.2.2
QtPy==2.0.0
requests==2.27.1
rsa==4.8
rstcheck==3.3.1
scipy==1.8.0
scooby==0.5.12
Send2Trash==1.8.0
six==1.16.0
sniffio==1.2.0
snooty-lextudio==1.12.0
snowballstemmer==2.2.0
soupsieve==2.3.2.post1
Sphinx==4.4.0
sphinx-autobuild==2021.3.14
sphinx-autodoc-typehints==1.16.0
sphinx-copybutton==0.4.0
sphinx-gallery==0.10.1
sphinx-notfound-page==0.8
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sphinxcontrib-websupport==1.2.4
sphinxemoji==0.2.0
sympy==1.9
tenacity==8.0.1
terminado==0.12.1
testpath==0.5.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==2.0.0
tornado==6.1
tqdm==4.62.3
traitlets==5.1.1
traittypes==0.2.1
Twisted==21.7.0
twisted-iocpsupport==1.0.2
txaio==21.2.1
typing_extensions==4.0.1
uritemplate==4.1.1
urllib3==1.26.8
userpath==1.8.0
virtualenv==20.13.2
vtk==9.0.3
watchdog==1.0.2
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.2.3
widgetsnbextension==3.5.2
wincertstore==0.2
wslink==1.3.1
yarl==1.7.2
zipp==3.7.0
zope.interface==5.4.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions