Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly candidate 252 pytest failure #1041

Closed
dipinknair opened this issue Jan 14, 2025 · 1 comment
Closed

Nightly candidate 252 pytest failure #1041

dipinknair opened this issue Jan 14, 2025 · 1 comment
Assignees

Comments

@dipinknair
Copy link
Collaborator

Here is a simple script that throws an exception

from ansys.mechanical.core import App
app=App(version=252)
app.update_globals(globals())
harmonic_acoustic = Model.AddHarmonicAcousticAnalysis()
harmonic_acoustic.SystemID

this is suppose to show only deprecation warning but with 252 its giving the exception as below.

<stdin>:1: UserWarning: Obsolete: 'SystemID': Property is obsolete, this gets the directory name of the current analysis, not always same as the Workbench level System ID
CRITICAL -  -  logging - handle_exception - Uncaught exception
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
System.Runtime.InteropServices.COMException:  (0x80004005)
  at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <e85874d36dd54c51a7dcd93d72f2c404>:0
  at (wrapper cominterop) Ansys.Common.Interop.DSObjectsAuto.IDSAnswerSetAuto.get_WorkingDir()
  at (wrapper cominterop-invoke) Ansys.Common.Interop.DSObjectsAuto.IDSAnswerSetAuto.get_WorkingDir()
  at Ansys.ACT.Automation.Mechanical.Analysis.get_WorkingDir () [0x00014] in <544882d8fcda455db83dfacecb22b3e2>:0
  at Ansys.ACT.Automation.Mechanical.Analysis.get_SystemID () [0x00005] in <544882d8fcda455db83dfacecb22b3e2>:0
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <e85874d36dd54c51a7dcd93d72f2c404>:0

Originally posted by @dipinknair in #1030 (comment)

@dipinknair
Copy link
Collaborator Author

This will be fixed with merge of ansys/pymechanical-env#91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants