labelme icon indicating copy to clipboard operation
labelme copied to clipboard

QT4 = QT_VERSION[0] == "4" I don't know how to make it work.

Open JI4JUN opened this issue 2 years ago • 4 comments

(Pytorch) G:\swin\Swin-Transformer-Object-Detection-master\data\instance_segmentation>python labelme2coco.py data_annotated data_dataset_coco --labels labels.txt Traceback (most recent call last): File "labelme2coco.py", line 16, in import labelme File "C:\ProgramData\Anaconda3\envs\Pytorch\lib\site-packages\labelme_init_.py", line 17, in QT4 = QT_VERSION[0] == "4" TypeError: 'NoneType' object is not subscriptable

JI4JUN avatar Apr 24 '22 09:04 JI4JUN

seems qt is not installed properly. try conda install qt or re-create env with conda create -n new_env python=3 qt pyqt pyside2 -y

edit:

correct to conda create -c conda-forge -n new_env python=3.9 qt pyqt pyside2 -y

travishsu avatar May 06 '22 08:05 travishsu

What worked for me without using conda:

pip install pyqt5
pip install qtpy

montmejat avatar May 27 '22 15:05 montmejat

I got the same error. When I tried to run 'labelme' in terminal, this error appear:

Traceback (most recent call last): File "/usr/bin/labelme", line 33, in sys.exit(load_entry_point('labelme==4.6.0', 'console_scripts', 'labelme')()) File "/usr/bin/labelme", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/usr/lib/python3/dist-packages/labelme/init.py", line 17, in QT4 = QT_VERSION[0] == "4" TypeError: 'NoneType' object is not subscriptable

sleepyheead avatar Jun 01 '22 17:06 sleepyheead

seems qt is not installed properly. try conda install qt or re-create env with conda create -n new_env python=3 qt pyqt pyside2 -y

In case someone meet the conda pyside2 PackageNotFound error, please add conda-forge channel

conda create -c conda-forge -n new_env python=3 qt pyqt pyside2

HowcanoeWang avatar Jun 30 '22 00:06 HowcanoeWang