Open klmcadams opened 1 year ago
use the resolver module from pymechanical instead of resolve() function in main.py
Add ansys.mechanical.core as a dependency
from ansys.mechanical.core.embedding import resolver
get_version() - only return version
version = get_version() resolver()
I got this error, so I have to debug this to see if this implementation is possible:
CRITICAL - - logging - handle_exception - Uncaught exception Traceback (most recent call last): File "C:\Users\kmcadams\mechanical-stubs\main.py", line 23, in ansys.mechanical.core.embedding.resolver.resolve(version) File "C:\Users\kmcadams\mechanical-stubs.venv\Lib\site-packages\ansys\mechanical\core\embedding\resolver.py", line 14, in resolve clr.AddReference("Ansys.Mechanical.Embedding") System.IO.FileNotFoundException: Could not load file or assembly 'Ansys.Mechanical.Embedding' or one of its dependencies. The system cannot find the file specified. File name: 'Ansys.Mechanical.Embedding' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
No response
π Description of the feature
use the resolver module from pymechanical instead of resolve() function in main.py
π‘ Steps for implementing the feature
Add ansys.mechanical.core as a dependency
from ansys.mechanical.core.embedding import resolver
get_version() - only return version
version = get_version() resolver()
I got this error, so I have to debug this to see if this implementation is possible:
CRITICAL - - logging - handle_exception - Uncaught exception Traceback (most recent call last): File "C:\Users\kmcadams\mechanical-stubs\main.py", line 23, in
ansys.mechanical.core.embedding.resolver.resolve(version)
File "C:\Users\kmcadams\mechanical-stubs.venv\Lib\site-packages\ansys\mechanical\core\embedding\resolver.py", line 14, in resolve
clr.AddReference("Ansys.Mechanical.Embedding")
System.IO.FileNotFoundException: Could not load file or assembly 'Ansys.Mechanical.Embedding' or one of its dependencies. The system cannot find the file specified.
File name: 'Ansys.Mechanical.Embedding'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&
stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
π Useful links and references
No response