labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

AssertionError: Missing string id : useDefaultLabel

Open vanangamudi opened this issue 7 years ago • 8 comments

I just cloned, installed the deps and launched the app. I get this error.

Traceback (most recent call last):
  File "labelImg.py", line 1475, in <module>
    sys.exit(main())
  File "labelImg.py", line 1471, in main
    app, _win = get_main_app(sys.argv)
  File "labelImg.py", line 1464, in get_main_app
    argv[3] if len(argv) >= 4 else None)
  File "labelImg.py", line 120, in __init__
    self.useDefaultLabelCheckbox = QCheckBox(getStr('useDefaultLabel'))
  File "labelImg.py", line 85, in <lambda>
    getStr = lambda strId: self.stringBundle.getString(strId)
  File "/home/vanangamudi/home/projects/code/cloned/lblimg/libs/stringBundle.py", line 43, in getString
    assert(stringId in self.idToMessage), "Missing string id : " + stringId
AssertionError: Missing string id : useDefaultLabel

  • Ubuntu 17.10
  • PyQt 5.10.1

vanangamudi avatar Mar 25 '19 11:03 vanangamudi

You probably did the same thing as I did, when encountering the missing package "resources" you installed the pypi package "resources", while you needed to create a resources.py file with the following command in the labelImg root directory.

pyrcc5 resources.qrc -o resources.py

srslynow avatar Mar 29 '19 09:03 srslynow

how do you solve it ,I have the same problem

shijubushiju avatar Apr 12 '19 02:04 shijubushiju

I installed labelImg from Pypi and resulted same. Cloning the repo was fine

Ir1d avatar May 04 '19 06:05 Ir1d

I have the same issue on the Mac. I cloned the repo and ran

pyrcc5 -o resources.py resources.qrc

I also moved the resources directory inside the libs and re-run this step, but it still doesn't work.

foranuj avatar Jun 17 '21 06:06 foranuj

I am still facing the error I am have tried this in a virtual environment on Arch Linux.

mmkumr avatar Feb 17 '22 22:02 mmkumr

OS: Windows PyQt 5.10.1

I am facing the same problem even after following the above solution!!!

  1. I cloned the repository.
  2. Used these commands pyrcc5 -o libs/resources.py resources.qrc python labelImg.py
  3. Still error : labelImg\libs\stringBundle.py", line 47, in get_string assert(string_id in self.id_to_message), "Missing string id : " + string_id AssertionError: Missing string id : useDefaultLabel

udayposia avatar Feb 18 '22 03:02 udayposia

File "D:\workspace\pythonproject\TensorflowObjectDetection\TFODCourse\Tensorflow\labelimg\labelImg.py", line 1649, in sys.exit(main()) File "D:\workspace\pythonproject\TensorflowObjectDetection\TFODCourse\Tensorflow\labelimg\labelImg.py", line 1645, in main app, _win = get_main_app(sys.argv) File "D:\workspace\pythonproject\TensorflowObjectDetection\TFODCourse\Tensorflow\labelimg\labelImg.py", line 1636, in get_main_app win = MainWindow(args.image_dir, File "D:\workspace\pythonproject\TensorflowObjectDetection\TFODCourse\Tensorflow\labelimg\labelImg.py", line 124, in init self.use_default_label_checkbox = QCheckBox(get_str('useDefaultLabel')) File "D:\workspace\pythonproject\TensorflowObjectDetection\TFODCourse\Tensorflow\labelimg\labelImg.py", line 87, in get_str = lambda str_id: self.string_bundle.get_string(str_id) File "D:\workspace\pythonproject\TensorflowObjectDetection\TFODCourse\Tensorflow\labelimg\libs\stringBundle.py", line 47, in get_string assert(string_id in self.id_to_message), "Missing string id : " + string_id AssertionError: Missing string id : useDefaultLabel

I am facing the same problem even after following the above solution!!!

girishgodage avatar Feb 22 '22 04:02 girishgodage

Hi , Try to fetch the latest code. This has been fixed

tzutalin avatar Feb 23 '22 07:02 tzutalin