Open DragomirDeltchev opened 3 weeks ago
Hi Team,
I noticed that, if I include a solve in batch using
embedded_app.DataModel.Project.Model.Solve()
and subsequently plot with matplotlib the Python editor will crash. The remedy is to use:
embedded_app.new()
but maybe it should work also without this line or at least should not crash the editor. Could you please have a look? Thank you
Best, Drago
1) open a model using PyMechanical 2) execute solution using app.solve() 3) include plot using matplotlib
Windows
2024R2
3.9
alabaster==0.7.13 ansys-api-mechanical==0.1.2 ansys-api-platform-instancemanagement==1.0.0 ansys-dpf-composites==0.3.2 ansys-dpf-core==0.9.0 ansys-dpf-gate==0.4.1 ansys-dpf-gatebin==0.4.1 ansys-dpf-post==0.5.0 ansys-grpc-dpf==0.8.1 ansys-mechanical-core==0.10.11 ansys-mechanical-env==0.1.6 ansys-platform-instancemanagement==1.1.2 ansys-pythonnet==3.1.0rc3 ansys-tools-path==0.3.1 anyio==4.4.0 appdirs==1.4.4 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 astroid==3.2.2 asttokens==2.4.0 async-lru==2.0.4 atomicwrites==1.4.1 attrs==23.1.0 autopep8==2.0.4 Babel==2.12.1 backcall==0.2.0 bcrypt==4.0.1 beautifulsoup4==4.12.2 binaryornot==0.4.4 black==24.2.0 bleach==6.0.0 cachetools==5.3.1 certifi==2023.7.22 cffi==1.16.0 chardet==5.2.0 charset-normalizer==3.2.0 click==8.1.7 cloudpickle==2.2.1 clr-loader==0.2.6 colorama==0.4.6 comm==0.1.4 contourpy==1.2.0 cookiecutter==2.3.1 cpylog==1.5.0 cryptography==41.0.4 cycler==0.12.1 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 diff-match-patch==20230430 dill==0.3.7 docopt-ng==0.9.0 docstring-to-markdown==0.12 docutils==0.20.1 exceptiongroup==1.1.3 executing==1.2.0 fastjsonschema==2.18.0 flake8==7.0.0 fonttools==4.47.0 fqdn==1.5.1 google-api-core==2.12.0 google-api-python-client==2.101.0 google-auth==2.23.2 google-auth-httplib2==0.1.1 googleapis-common-protos==1.60.0 grpcio==1.58.0 h11==0.14.0 httpcore==1.0.5 httplib2==0.22.0 httpx==0.27.0 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 importlib-resources==6.1.1 inflection==0.5.1 intervaltree==3.1.0 ipykernel==6.29.4 ipython==8.15.0 ipython-genutils==0.2.0 isoduration==20.11.0 isort==5.12.0 jaraco.classes==3.3.0 jedi==0.18.2 jellyfish==1.0.1 Jinja2==3.1.2 json5==0.9.25 jsonpointer==3.0.0 jsonschema==4.19.1 jsonschema-specifications==2023.7.1 jupyter-events==0.10.0 jupyter-lsp==2.2.5 jupyter_client==8.3.1 jupyter_core==5.3.2 jupyter_server==2.14.1 jupyter_server_terminals==0.5.3 jupyterlab==4.2.2 jupyterlab-pygments==0.2.2 jupyterlab_server==2.27.2 keyring==24.2.0 kiwisolver==1.4.5 lazy-object-proxy==1.9.0 markdown-it-py==3.0.0 MarkupSafe==2.1.3 matplotlib==3.8.2 matplotlib-inline==0.1.6 mccabe==0.7.0 mdurl==0.1.2 mistune==3.0.1 more-itertools==10.1.0 mypy-extensions==1.0.0 nbclient==0.8.0 nbconvert==7.8.0 nbformat==5.9.2 nest-asyncio==1.5.8 notebook_shim==0.2.4 numpy==1.26.0 numpydoc==1.6.0 overrides==7.7.0 packaging==23.1 pandocfilters==1.5.0 paramiko==3.3.1 parso==0.8.3 pathspec==0.11.2 pexpect==4.8.0 pickleshare==0.7.5 Pillow==10.1.0 platformdirs==3.10.0 pluggy==1.3.0 pooch==1.8.0 prometheus_client==0.20.0 prompt-toolkit==3.0.39 protobuf==3.20.3 psutil==5.9.5 ptyprocess==0.7.0 pure-eval==0.2.2 pyasn1==0.5.0 pyasn1-modules==0.3.0 pycodestyle==2.11.1 pycparser==2.22 pydocstyle==6.3.0 pyflakes==3.2.0 Pygments==2.16.1 pylint==3.2.2 pylint-venv==3.0.2 pyls-spyder==0.4.0 PyNaCl==1.5.0 pyNastran==1.4.1 pyparsing==3.1.1 PyQt5==5.15.9 PyQt5-Qt5==5.15.2 PyQt5-sip==12.12.2 PyQtWebEngine==5.15.6 PyQtWebEngine-Qt5==5.15.2 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-black==2.0.0 python-lsp-jsonrpc==1.1.2 python-lsp-server==1.11.0 python-slugify==8.0.1 pytoolconfig==1.2.5 pyvista==0.43.1 pywin32==306 pywin32-ctypes==0.2.2 pywinpty==2.0.13 PyYAML==6.0.1 pyzmq==25.1.1 QDarkStyle==3.2.3 qstylizer==0.2.2 QtAwesome==1.3.1 qtconsole==5.5.1 QtPy==2.4.0 referencing==0.30.2 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.5.3 rope==1.12.0 rpds-py==0.10.3 rsa==4.9 Rtree==1.0.1 scipy==1.13.1 scooby==0.7.3 Send2Trash==1.8.3 six==1.16.0 sniffio==1.3.1 snowballstemmer==2.2.0 sortedcontainers==2.4.0 soupsieve==2.5 Sphinx==7.2.6 sphinxcontrib-applehelp==1.0.7 sphinxcontrib-devhelp==1.0.5 sphinxcontrib-htmlhelp==2.0.4 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 spyder==5.5.4 spyder-kernels==2.5.1 stack-data==0.6.2 style==1.1.0 tabulate==0.9.0 terminado==0.18.1 text-unidecode==1.3 textdistance==4.6.0 three-merge==0.1.1 tinycss2==1.2.1 tomli==2.0.1 tomlkit==0.12.1 tornado==6.3.3 tqdm==4.66.1 traitlets==5.10.1 typing_extensions==4.8.0 ujson==5.8.0 update==0.0.1 uri-template==1.3.0 uritemplate==4.1.1 urllib3==2.0.5 vtk==9.3.0 watchdog==3.0.0 wcwidth==0.2.6 webcolors==24.6.0 webencodings==0.5.1 websocket-client==1.8.0 whatthepatch==1.0.5 wrapt==1.15.0 yapf==0.40.2 zipp==3.17.0
please note that WB is crashing in case app.new() is not included. Thank you
https://github.com/user-attachments/assets/02ccbbfe-00d3-47a6-b430-898dbe4eb802
Motion_Adjust_Solve_Post-Processing.txt Garrett_backup.zip
🔍 Before submitting the issue
🐞 Description of the bug
Hi Team,
I noticed that, if I include a solve in batch using
embedded_app.DataModel.Project.Model.Solve()
and subsequently plot with matplotlib the Python editor will crash. The remedy is to use:
embedded_app.new()
but maybe it should work also without this line or at least should not crash the editor. Could you please have a look? Thank you
Best, Drago
📝 Steps to reproduce
1) open a model using PyMechanical 2) execute solution using app.solve() 3) include plot using matplotlib
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2024R2
🐍 Which Python version are you using?
3.9
📦 Installed packages