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

Use resolver function from pymechanical in main.py #6

Open
klmcadams opened this issue Aug 25, 2023 · 0 comments
Open

Use resolver function from pymechanical in main.py #6

klmcadams opened this issue Aug 25, 2023 · 0 comments
Labels
enhancement New features or code improvements

Comments

@klmcadams
Copy link
Collaborator

📝 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

@klmcadams klmcadams added the enhancement New features or code improvements label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

No branches or pull requests

1 participant