Skip to content

Added 1 line to fix error in loading Stl meshes#73

Merged
Ipuch merged 2 commits intopyomeca:mainfrom
p-shg:Fix_STL_Viz
Sep 11, 2025
Merged

Added 1 line to fix error in loading Stl meshes#73
Ipuch merged 2 commits intopyomeca:mainfrom
p-shg:Fix_STL_Viz

Conversation

@p-shg
Copy link
Copy Markdown

@p-shg p-shg commented Sep 10, 2025

Ran into the following error when using a BioMod linked to STL meshes

  File "/home/pierre/miniconda3/envs/pyorerun_sandbox/lib/python3.12/site-packages/pyorerun/model_components/mesh.py", line 18, in __init__
    mesh.metadata["file_name"] if "file_name" in mesh.metadata else mesh.metadata["header"].replace(" ", "")
                                                                    ~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'header'

This PR fixes that problem


This change is Reviewable

@Ipuch
Copy link
Copy Markdown
Collaborator

Ipuch commented Sep 10, 2025

That type of PR 😎😎

@Ipuch
Copy link
Copy Markdown
Collaborator

Ipuch commented Sep 10, 2025

@p-shg black your code and it should be good to me :)

@p-shg
Copy link
Copy Markdown
Author

p-shg commented Sep 11, 2025

Sorry I thought I did, should be good now

@Ipuch Ipuch merged commit 83e9a5c into pyomeca:main Sep 11, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants