-
Notifications
You must be signed in to change notification settings - Fork 2
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
Inconsistency issue #110
Comments
According to the documentation, these functions do two different things
find_mechanical:
|
@Gryfenfer97 @samigithub2022 I see. I think the problem here is that the user did this: Install and try to use PyMechanical, which runs find_mechanical and then caches the location in appdata. Then, the user gets an error message about requiring 232+, so they install it. But then when they try to use PyMechanical it tries to use the cached version. I think we most probably have to make sure that trying to use PyMechanical with an older version of Mechanical installed does not cause any artifact to be produced in the user's appdata pointing to that older version. @Gryfenfer97 on another note - is there a quick API to wipe the config of ansys.tools.path? In the linked bug, I asked the user to use platformdirs directly, but its not so convenient |
I think we should expose it. From the docstring:
|
The takeaway for me is that we should (1) support clear_config_file (imo the name be different, config file is an implementation detail that we shouldn't necessarily expose) and (2) fix the scenario where this might happen in PyMechanical or other applications or (3) add some minimum version argument to things like |
The correct way for client libraries is to use "get" first, then use "find" if its not available in "get", but never to save unless the user explicitly does so. We need to make sure that PyMechanical does it that way |
Actually, |
See related PyMechanical issue
For this user,
get_mechanical_path(False)
poins to v212But,
ansys.mechanical.core.find_mechanical()[0]
.apparently points to a newer installation.
The text was updated successfully, but these errors were encountered: