# Crashing of 3DSlicer version 5.8.1 after importing openGate Python package

**URL:** <https://discourse.slicer.org/t/crashing-of-3dslicer-version-5-8-1-after-importing-opengate-python-package/43256>\
**Category:** Development\
**Created:** [June 7, 2025, 11:47am UTC](https://discourse.slicer.org/t/crashing-of-3dslicer-version-5-8-1-after-importing-opengate-python-package/43256 "2025-06-07T11:47:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [June 7, 2025, 11:47am UTC](https://discourse.slicer.org/t/crashing-of-3dslicer-version-5-8-1-after-importing-opengate-python-package/43256/1 "2025-06-07T11:47:06Z")

</div>

Hello Dear Developers and Users

I installed the [opengate](https://opengate-python.readthedocs.io/en/master/user_guide/index.html) library in python of 3DSlicer. But after importing it in python interactor and pressing the _menu key_ or pressing the _tab key_ for completing the names of imported libraries, on keyword, suddenly 3DSlicer crash and close, and I see below message in terminal.

```auto
sn@mph:~$ /home/sn/Slicer-5.8.1-linux-amd64/Slicer 
Switch to module: "Welcome"
Python console user input: import opengate
nativeResourceForScreen: null screen
nativeResourceForScreen: null screen
Cannot create window: no screens available
error: [/home/sn/Slicer-5.8.1-linux-amd64/bin/SlicerApp-real] exit abnormally - Report the problem.
sn@mph:~$ 

```

Please guide me to solve it.  
Best regards.  
Shahrokh.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 7, 2025, 1:28pm UTC](https://discourse.slicer.org/t/crashing-of-3dslicer-version-5-8-1-after-importing-opengate-python-package/43256/2 "2025-06-07T13:28:56Z")

</div>

Pressing “Tab” key evaluates all attributes available in that module (to determine if they are callable functions and so parenthesis should be added after the name). If `opengate` is not implemented robustly then these evaluations cause a crash, which brings down the Slicer application.

I would recommend to find which exact attribute is implemented inappropriately by running this code in the Slicer Python console and then report that problem to opengate developers:

```python
moduleName = 'opengate'
attributeNames = dir(moduleName)
for attributeName in attributeNames:
    print(f"{attributeName}:")
    print(f" value: {getattr(moduleName, attributeName)}")
    print(f" callable: {callable(getattr(moduleName, attributeName))}")

```

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [June 8, 2025, 4:12am UTC](https://discourse.slicer.org/t/crashing-of-3dslicer-version-5-8-1-after-importing-opengate-python-package/43256/3 "2025-06-08T04:12:44Z")

</div>

Thank you very much for your guidance.
