Commit 1af4806
Catch AttributeErrors in cleanup (#57)
# Pull Request
### What change is being made
Catch `AttributeError`s in cleanup.
### Why this change is being made
Avoid error message:
```
Exception ignored in: <function IsaacLabExportableEnvironment.__del__ at 0x7660b13e7240>
Traceback (most recent call last):
File "/workspace/external/exploy/exploy/exporter/frameworks/isaaclab/env.py", line 65, in __del__
self.cleanup()
File "/workspace/external/exploy/exploy/exporter/frameworks/isaaclab/env.py", line 73, in cleanup
for i_articulation, articulation in enumerate(self._env.scene.articulations.values()):
^^^^^^^^^^^^^^^
AttributeError: 'ManagerBasedRLEnv' object has no attribute 'scene'
```
### Tested
Confirmed error disappeared.
GitOrigin-RevId: 2866e7b9c38de2437d2b753a67ec3a42167646e01 parent 63cacaa commit 1af4806
1 file changed
Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| |||
0 commit comments