Skip to content

TypeError raised when trying to label frames #3245

@C-Achard

Description

@C-Achard

Required data

This issue appears to be related to the Qt backend stack (shiboken, napari, PySide6).
We kindly request users facing this issue to report below the output of:

python --version
python -c "import platform; print(platform.platform())"

python -c "import deeplabcut; print('deeplabcut', deeplabcut.__version__)"
python -c "import napari; print('napari', napari.__version__)"
python -c "import qtpy; print('qtpy', qtpy.__version__); print('Qt API:', qtpy.API_NAME)"
python -c "import PySide6; print('PySide6', PySide6.__version__)"
python -c "import importlib.metadata as m; print('shiboken6', m.version('shiboken6'))"
python -c "import importlib.metadata as m; print('napari-deeplabcut', m.version('napari-deeplabcut'))"

# if you use conda:
conda list | findstr /I "deeplabcut napari napari-deeplabcut qtpy pyside pyqt shiboken"

to help us pinpoint the exact cause. Thank you!

Operating System

Reported on WIndows and Linux so far

DeepLabCut version

Not reported so far

Bug description 🐛

When labeling frames, users have reported the following shiboken error:

File "C:\Users\...\anaconda3\envs\DEEPLABCUT\lib\abc.py", line 106, in new
cls = super().new(mcls, name, bases, namespace, **kwargs)
TypeError: Shiboken.ObjectType.new(MetaWidgetControlsBase) is not safe, use type.new()

which originates from launching napari using the "Label frames" button.

This is very likely an issue with mismatched PySide/Qt/napari versions, or potentially a backwards-incompatible shiboken version.

Steps To Reproduce

  1. Launch the GUI
  2. "Label frames"
  3. Occurs on napari opening

Relevant log output

Excerpted from: https://forum.image.sc/t/typeerror-raised-when-trying-to-label-frames/119752

File "C:\Users\Gebruiker\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\gui\tabs\label_frames.py", line 135, in label_frames
_ = launch_napari(folder)
File "C:\Users\Gebruiker\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\gui\widgets.py", line 38, in launch_napari
viewer = napari.Viewer()
...
File "C:\Users\Gebruiker\anaconda3\envs\DEEPLABCUT\lib\abc.py", line 106, in new
cls = super().new(mcls, name, bases, namespace, **kwargs)
TypeError: Shiboken.ObjectType.new(MetaWidgetControlsBase) is not safe, use type.new()

Anything else?

Mentioned in the following reports so far:

Code of Conduct

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions