ansys / pymechanical

Pythonic interface to Ansys Mechanical β„’
https://mechanical.docs.pyansys.com/
MIT License
34 stars 17 forks source link

[Embedding] Bug running embedded mechanical in python 3.10.11 #255

Closed waltersma closed 3 months ago

waltersma commented 1 year ago

πŸ” Before submitting the issue

🐞 Description of the bug

See following error when embedding mechanical in python:

Exception has occurred: SEHException (0x80004005): External component has thrown an exception. File "test.py", line 7, in with App() as app:

πŸ“ Steps to reproduce

from ansys.mechanical.core import App

with App() as app: print(app)

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

23r2 pre release

🐍 Which Python version are you using?

3.10

πŸ“¦ Installed packages

ansys-api-mechanical==0.1.0
ansys-api-platform-instancemanagement==1.0.0b3
ansys-mechanical-core==0.8.0
ansys-platform-instancemanagement==1.1.1
ansys-pythonnet==3.1.0rc1
appdirs==1.4.4
cffi==1.15.1
clr-loader==0.2.5
colorama==0.4.6
googleapis-common-protos==1.59.0
grpcio==1.54.2
importlib-metadata==6.6.0
protobuf==3.20.3
protoc-gen-swagger==0.1.0
pycparser==2.21
tqdm==4.65.0
zipp==3.15.0
koubaa commented 1 year ago

I'm working on a branch that adds enhanced logging capabilities to embedding, which will help diagnose issues like this one. I currently don't have python 3.10 installed but will try this soon

koubaa commented 1 year ago

@waltersma Upgrade to pymechanical version 0.9.

There you can set up logging, as documented here:

https://mechanical.docs.pyansys.com/version/stable/user_guide_embedding/logging.html

I need to see the log at the DEBUG level in order to know why it failed to start up

RemishR commented 1 year ago

I am getting an error while I am trying to embed an instance of mechanical in python using pymechanical. I don't know what is the issue. Could you please check?

I have installed ansys-mechanical-core 0.8.0 Ansys Version 2023 R1 python 3.10.11

Input output

koubaa commented 1 year ago

@RemishR please file a new issue, don't add an unrelated issue to an existing one.

koubaa commented 12 months ago

I came up with a workaround for walter... but need to spend more time to find out the root cause and fix it

koubaa commented 3 months ago

With version 2024R2, this should no loner be an issue