ansys / pymechanical

Pythonic interface to Ansys Mechanical ™
https://mechanical.docs.pyansys.com/
MIT License
38 stars 19 forks source link

Initializing pymechanical fails on Ubuntu 20.04 (WSL) #352

Closed janvonrickenbach closed 4 months ago

janvonrickenbach commented 1 year ago

🔍 Before submitting the issue

🐞 Description of the bug

A simple script (test.py) containing

from ansys.mechanical.core import App
app = App(version=241)

or

import ansys.mechanical.core as pymechanical
mechanical = pymechanical.launch_mechanical(batch=True, version="241")

Started from a virtual env with pymechanical installed:

$AWP_ROOT241/aisol/.workbench_lite python test.py

Fails with the following output (the first mono warning only appears with the embedded interface, first snipped above):

/home/jvonrick/.cache/pypoetry/virtualenvs/ansys-acp-core-aMHYZ2ax-py3.8/lib/python3.8/site-packages/clr_loader/mono.py:180: UserWarning: Hosting Mono versions before v6.12 is known to be problematic. If the process crashes shortly after you see this message, try updating Mono to at least v6.12. warnings.warn( [%wc] Script Error Line: 5551 Char: 2 Error: Code: 80028019 Source: Script: ed = Applet("EDApplet").App; [%wc] Script Error Line: 8379 Char: 4 Error: Code: 80028019 Source: Script: Trace("TRACING:DSMainScript Getting App Object started");


A fatal error has occurred within AnsysWBU.exe and it must be closed...


Aborted

What I tried/checked:

2023-08-16 09:51:38.255734 [DESIGNSPACE, trace]: DSFileManagement2::UpdateSession - created temporary folder: /tmp/ANSYS.jvonrick.1/AnsysMech322C/
2023-08-16 09:51:38.255851 [DESIGNSPACE, trace]: DSFileManagement2::UpdateSession - Created Base Project Folder: /tmp/ANSYS.jvonrick.1/AnsysMech322C/Project_Mech_Files/

log output for failed run:

log_failed.txt

log for successful run (with sudo):

log_success.txt

📝 Steps to reproduce

See above

💻 Which operating system are you using?

Linux

📀 Which ANSYS version are you using?

2024 R1 build installed on the 8/15/2023 on Ubuntu 20.04 WSL

🐍 Which Python version are you using?

3.8

📦 Installed packages

accessible-pygments==0.0.4
aiohttp==3.8.5
aiosignal==1.3.1
alabaster==0.7.13
-e git+ssh://git@github.com/ansys-internal/pyacp.git@002d4802d4216975644729b8c8c6cd55b5551a16#egg=ansys_acp_core
ansys-api-acp @ git+https://github.com/ansys-internal/ansys-api-acp.git@3003ebf60b59ec41f5cedbb9a18194ead7c90dab
ansys-api-mapdl==0.5.1
ansys-api-mechanical==0.1.0
ansys-api-platform-instancemanagement==1.0.0
ansys-api-tools-filetransfer @ git+https://github.com/ansys-internal/ansys-api-tools-filetransfer.git@1765ee7a2d6a10d74716f54f04f96898db657934
ansys-corba==0.1.1
ansys-dpf-composites==0.3.0
ansys-dpf-core==0.9.0
ansys-dpf-gate==0.4.1
ansys-dpf-gatebin==0.4.1
ansys-grpc-dpf==0.8.1
ansys-mapdl-core==0.65.2
ansys-mapdl-reader==0.52.20
ansys-mechanical-core==0.10.1
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc1
ansys-sphinx-theme==0.10.3
ansys-tools-filetransfer @ git+https://github.com/ansys-internal/ansys-tools-filetransfer.git@5cbfdf8002c92259e8605e0961c414a3a2fa5e50
ansys-tools-local-product-launcher @ git+https://github.com/ansys-internal/ansys-tools-local-product-launcher.git@96639d903a779cbbbd27de78b9f86e26b3f790dc
ansys-tools-path==0.3.1
anyio==3.7.1
appdirs==1.4.4
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
asttokens==2.2.1
async-lru==2.0.4
async-timeout==4.0.3
attrs==23.1.0
Babel==2.12.1
backcall==0.2.0
beautifulsoup4==4.12.2
black==23.3.0
bleach==6.0.0
bokeh==3.1.1
cachetools==5.3.1
certifi==2023.7.22
cffi==1.15.1
cfgv==3.4.0
charset-normalizer==3.2.0
click==8.1.6
clr-loader==0.2.6
comm==0.1.4
contourpy==1.1.0
coverage==7.3.0
cycler==0.11.0
debugpy==1.6.7.post1
decopatch==1.4.10
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.7
docker==6.1.3
docutils==0.19
exceptiongroup==1.1.3
executing==1.2.0
fastjsonschema==2.18.0
filelock==3.12.2
fonttools==4.42.0
fqdn==1.5.1
frozenlist==1.4.0
geomdl==5.3.1
google-api-core==2.11.1
google-api-python-client==2.96.0
google-auth==2.17.3
google-auth-httplib2==0.1.0
googleapis-common-protos==1.60.0
grpcio==1.57.0
grpcio-health-checking==1.48.2
httplib2==0.22.0
hypothesis==6.82.4
identify==2.5.26
idna==3.4
imagesize==1.4.1
importlib-metadata==6.8.0
importlib-resources==6.0.1
iniconfig==2.0.0
ipycanvas==0.13.1
ipydatawidgets==4.3.5
ipyevents==2.0.1
ipykernel==6.25.1
ipython==8.12.2
ipython-genutils==0.2.0
ipyvtklink==0.2.3
ipywidgets==7.8.0
isoduration==20.11.0
jedi==0.19.0
Jinja2==3.1.2
json5==0.9.14
jsonpointer==2.4
jsonschema==4.19.0
jsonschema-specifications==2023.7.1
jupyter-events==0.7.0
jupyter-lsp==2.2.0
jupyter_client==8.3.0
jupyter_core==5.3.1
jupyter_server==2.7.1
jupyter_server_proxy==4.0.0
jupyter_server_terminals==0.4.4
jupyterlab==4.0.5
jupyterlab-pygments==0.2.2
jupyterlab-widgets==1.1.5
jupyterlab_server==2.24.0
kiwisolver==1.4.4
linkify-it-py==2.0.2
makefun==1.15.1
Markdown==3.4.4
markdown-it-py==3.0.0
MarkupSafe==2.1.3
matplotlib==3.7.2
matplotlib-inline==0.1.6
mdit-py-plugins==0.4.0
mdurl==0.1.2
mistune==3.0.1
multidict==6.0.4
mypy==1.5.0
mypy-extensions==1.0.0
nbclient==0.8.0
nbconvert==7.7.3
nbformat==5.9.2
nest-asyncio==1.5.7
nodeenv==1.8.0
notebook==7.0.2
notebook_shim==0.2.3
numpy==1.24.4
numpydoc==1.5.0
overrides==7.4.0
packaging==23.1
pandas==2.0.3
pandocfilters==1.5.0
panel==1.2.1
param==1.13.0
parso==0.8.3
pathspec==0.11.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==10.0.0
pkgutil_resolve_name==1.3.10
platformdirs==3.10.0
pluggy==1.2.0
pooch==1.7.0
pre-commit==2.21.0
prometheus-client==0.17.1
prompt-toolkit==3.0.39
protobuf==3.20.3
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
py-cpuinfo==9.0.0
pyansys-tools-versioning==0.4.0
pyasn1==0.5.0
pyasn1-modules==0.3.0
pycparser==2.21
pydata-sphinx-theme==0.13.3
Pygments==2.16.1
pyiges==0.3.1
pypandoc==1.11
pyparsing==3.0.9
pytest==7.4.0
pytest-benchmark==4.0.0
pytest-cases==3.6.14
pytest-cov==4.1.0
python-dateutil==2.8.2
python-json-logger==2.0.7
pythreejs==2.4.2
pytz==2023.3
pyvista==0.41.1
pyviz-comms==2.3.2
PyYAML==6.0.1
pyzmq==25.1.1
referencing==0.30.2
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.9.2
rsa==4.9
scipy==1.9.3
scooby==0.7.2
Send2Trash==1.8.2
simpervisor==1.0.0
six==1.16.0
sniffio==1.3.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
soupsieve==2.4.1
Sphinx==6.2.1
sphinx-autodoc-typehints==1.23.0
sphinx-copybutton==0.5.2
sphinx-gallery==0.13.0
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==0.6.2
terminado==0.17.1
tinycss2==1.2.1
tomli==2.0.1
tornado==6.3.3
tqdm==4.66.1
traitlets==5.9.0
traittypes==0.2.1
trame==3.1.0
trame-client==2.11.2
trame-server==2.11.7
trame-vtk==2.5.8
trame-vuetify==2.3.1
types-protobuf==4.24.0.1
typing_extensions==4.7.1
tzdata==2023.3
uc-micro-py==1.0.2
uri-template==1.3.0
uritemplate==4.1.1
urllib3==2.0.4
virtualenv==20.24.3
vtk==9.2.6
wcwidth==0.2.6
webcolors==1.13
webencodings==0.5.1
websocket-client==1.6.1
widgetsnbextension==3.6.5
wslink==1.11.1
xyzservices==2023.7.0
yarl==1.9.2
zipp==3.16.2
RobPasMue commented 1 year ago

@klmcadams @dipinknair - please work together on this.

koubaa commented 1 year ago

@janvonrickenbach what was the build date of mechanical on 241? Since it is pre-release this would affect things

janvonrickenbach commented 1 year ago

@koubaa CommonFiles/builddate.txt shows 08/14/2023 14:18:10

koubaa commented 5 months ago

@janvonrickenbach could you please try to reproduce this with 2024R2? Some stability improvements were made