# Binded with PythonQt class not visible on Linux but visible on Windows (SlicerCAT)

**URL:** <https://discourse.slicer.org/t/binded-with-pythonqt-class-not-visible-on-linux-but-visible-on-windows-slicercat/33493>\
**Category:** Development\
**Created:** [December 21, 2023, 6:22pm UTC](https://discourse.slicer.org/t/binded-with-pythonqt-class-not-visible-on-linux-but-visible-on-windows-slicercat/33493 "2023-12-21T18:22:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [December 21, 2023, 6:22pm UTC](https://discourse.slicer.org/t/binded-with-pythonqt-class-not-visible-on-linux-but-visible-on-windows-slicercat/33493/1 "2023-12-21T18:22:25Z")

</div>

Hi,

Among many classes that are successivle binded with PythonQt and **accessible** from python there are few that are binded but **not accessible** on Linux even though there are **accessible** on Windows.

For example there is a class called `ColadaReader` that is derived from `QDialog` and has default constructor.  
On Windows this works as expected:

```python
import qColadaAppPythonQt
reader = qColadaPythonQt.qColadaReader()

```

but the same project compiled on any Ubuntu 20.04 or CentOS 7 produce an exception:

```auto
import qColadaAppPythonQt
reader = qColadaAppPythonQt.qColadaReader()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
AttributeError: module 'qColadaAppPythonQt' has no attribute 'qColadaReader'

```

At the same time `qColadaReader` works as expected from C++ side.

To investigate the problem I list the exported symbols:

```auto
nm -D qColadaAppPythonQt.so

```

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/c/0c9a758912de0104e69b9432f1c489555a35f5e7.png)

As you can see there is `qColadaReader` in the list.

Then I tried `ldd qColadaAppPythonQt` shows that there are some dependecies:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/d/4d945ca6a81883f463062d577209dad51aa818c1.png)  
but paths to them are written in `ColadaLauncherSettings.ini` in `[LibraryPaths]` section so they should be loaded. And as I said it works from C++ side.

I also tried to explicitly add a decorator for that class but that didn’t helped. I think the class is binded but cant be loaded.

I’m a little bit confused but maybe somebody experienced have ideas what may be the reason of that?

---

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [December 22, 2023, 10:51am UTC](https://discourse.slicer.org/t/binded-with-pythonqt-class-not-visible-on-linux-but-visible-on-windows-slicercat/33493/2 "2023-12-22T10:51:16Z")

</div>

I’ve found a problem.

`qColadaReader` is a base class for `qColadaSegyReader`.  
`qColadaReader` is a class of `qColadaApp` library.  
`qColadaSegyReader` is a class of a module `qSlicerSeismicModuleWidgets`.

If I build extenstion externally then `qColadaReader` is in `qColadaAppPythonQt`.  
But if I build it during a Superbuild (application+extensions) then both `qColadaReader` and `qColadaSegyReader` are located in `qSlicerSeismicModuleWidgetsPythonQt`.

The question now is how to tell PythonQt to leave `qColadaReader` in `qColadaAppPythonQt` and `qColadaSegyReader` in `qSlicerSeismicModuleWidgetsPythonQt`…
