Skip to content

chore: Raise error if Ansys has no attribute Mechanical#1062

Merged
klmcadams merged 13 commits into
mainfrom
fix/error-message-ansys-dir
Jan 30, 2025
Merged

chore: Raise error if Ansys has no attribute Mechanical#1062
klmcadams merged 13 commits into
mainfrom
fix/error-message-ansys-dir

Conversation

@klmcadams
Copy link
Copy Markdown
Collaborator

When this error occurs:

assembly_resolver = Ansys.Mechanical.Embedding.AssemblyResolver
AttributeError: module 'Ansys' has no attribute 'Mechanical'

Raise the following error:

AttributeError: Unable to resolve Mechanical assemblies. Please ensure the following:
    1. Mechanical is installed
    2. A folder with the name "Ansys" does not exist in the same directory as the script being run.

Closes #513

@klmcadams klmcadams requested a review from a team as a code owner January 27, 2025 16:42
@github-actions github-actions Bot added the bug Something isn't working label Jan 27, 2025
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jan 27, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.30%. Comparing base (bbbd6c3) to head (2eec448).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1062      +/-   ##
==========================================
- Coverage   87.34%   81.30%   -6.04%     
==========================================
  Files          36       40       +4     
  Lines        2362     2755     +393     
==========================================
+ Hits         2063     2240     +177     
- Misses        299      515     +216     

@github-actions github-actions Bot added maintenance Package and maintenance related ci/cd Involves the GitHub workflow files labels Jan 27, 2025
@klmcadams klmcadams enabled auto-merge (squash) January 30, 2025 15:27
@klmcadams klmcadams merged commit 460b450 into main Jan 30, 2025
@klmcadams klmcadams deleted the fix/error-message-ansys-dir branch January 30, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci/cd Involves the GitHub workflow files documentation Improvements or additions to documentation maintenance Package and maintenance related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

starting embedding fails if the folder "Ansys" exists in the working directory

3 participants