Labelimg: Cannot start binary on Ubuntu

Created on 25 Jan 2019  路  5Comments  路  Source: tzutalin/labelImg

I cannot start the binary on Ubuntu 18.04.
Here is the error:

$ labelImg 
Traceback (most recent call last):
  File "/usr/local/bin/labelImg", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/labelImg/labelImg.py", line 1473, in main
    app, _win = get_main_app(sys.argv)
  File "/usr/local/lib/python3.6/dist-packages/labelImg/labelImg.py", line 1466, in get_main_app
    argv[3] if len(argv) >= 4 else None)
  File "/usr/local/lib/python3.6/dist-packages/labelImg/labelImg.py", line 130, in __init__
    self.useDefaultLabelCheckbox = QCheckBox(getStr('useDefaultLabel'))
  File "/usr/local/lib/python3.6/dist-packages/labelImg/labelImg.py", line 95, in <lambda>
    getStr = lambda strId: self.stringBundle.getString(strId)
  File "/usr/local/lib/python3.6/dist-packages/libs/stringBundle.py", line 36, in getString
    assert(stringId in self.idToMessage), "Missing string id : " + stringId
AssertionError: Missing string id : useDefaultLabel
  • OS: Ubuntu 18.04 64 bits
  • PyQt version: 5.11.3

labelImg was installed from pypi repo.

Most helpful comment

String translations are stored as Qt resources and they must be converted beforehand to Python modules so they can be imported. I guess they should update the instructions on the README file.

All 5 comments

I encountered the same question on ubuntu 16.04.

  • pyqt: 5.10.1
  • lxml: 4.2.4

You have to generate the resources with:

pyrcc5 resources.qrc -o resources.py

You have to generate the resources with:

pyrcc5 resources.qrc -o resources.py

ThankU ,i have successfully solved it ,but what is the reason

String translations are stored as Qt resources and they must be converted beforehand to Python modules so they can be imported. I guess they should update the instructions on the README file.

String translations are stored as Qt resources and they must be converted beforehand to Python modules so they can be imported. I guess they should update the instructions on the README file.

yeah,thanks for your reply,i've gor it

Was this page helpful?
0 / 5 - 0 ratings