HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.78k stars 6.31k forks source link

Error: labelImg.py:208: DeprecationWarning: an integer is required (got type DockWidgetFeatures). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python. #776

Open besbesmany opened 3 years ago

besbesmany commented 3 years ago

please help me I have this error

labelImg.py:208: DeprecationWarning: an integer is required (got type DockWidgetFeatures). Implicit conversion to integers using int is deprecated, and may be removed in a future version of Python. self.dock.setFeatures(self.dock.features() ^ self.dock_features) labelImg.py:563: DeprecationWarning: an integer is required (got type DockWidgetFeatures). Implicit conversion to integers using int is deprecated, and may be removed in a future version of Python. self.dock.setFeatures(self.dock.features() | self.dock_features)

civecikuv commented 3 years ago

The same thing happened to me. I was using some older version and wanted to pull newest version today, so after git pull i faced the same problem. I solved it by installing proposed versions of pyqt and lxlm. For Linux: sudo apt-get install pyqt5-dev-tools sudo pip3 install -r requirements/requirements-linux-python3.txt make qt5py3 Check out installation process in README again.

Bzz2745 commented 3 years ago

just change the line 208 to "self.dock.setFeatures(self.dock.features() ^ int(self.dock_features))" is ok(Change implicit conversion to explicit conversion) TIPS: don't try to write to the file using by others like cmd(it was locked), exit cmd then you all can change it.

I-Abdullah-I commented 2 years ago

@Bzz2745 Worked for me, thank you!

SaddamHosyn commented 2 years ago

how to replace the above line in cmd, that does not let me write anything and seems to me like hang

IffahSaiful commented 2 years ago

just change the line 208 to "self.dock.setFeatures(self.dock.features() ^ int(self.dock_features))" is ok(Change implicit conversion to explicit conversion)

it worked! thank you so much

sourabmaity commented 2 years ago

just change the line 208 to "self.dock.setFeatures(self.dock.features() ^ int(self.dock_features))" is ok(Change implicit conversion to explicit conversion)

just line number changed into 213 but the process worked. Thank you!

Harbednmez commented 2 years ago

just change the line 208 to "self.dock.setFeatures(self.dock.features() ^ int(self.dock_features))" is ok(Change implicit conversion to explicit conversion)

it worked thank youuuuuu

Ichalfians commented 2 years ago

how to replace the above line in cmd, that does not let me write anything and seems to me like hang

how to replace the above line in cmd, that does not let me write anything and seems to me like hang??please i cant replace it'

Ichalfians commented 2 years ago

@Bzz2745 hello how you can replace or change the line?? i cant replace above line in cmd thankyou, cause of this i cant continue my project thankyou vrymuch

Bzz2745 commented 2 years ago

close cmd before write to the file,you can't write to it while something just using it(it was locked.). i haven't found anyway to change code file in cmd......

Ichalfians commented 2 years ago

image

wait so i have to closed the cmd?? and then in where i can change the line thankyou somuch to rep my question T_T

Bzz2745 commented 2 years ago

image

wait so i have to closed the cmd?? and then in where i can change the line thankyou somuch to rep my question T_T

yes close it then write....

Ichalfians commented 2 years ago

@Bzz2745 oke i already close the cmd and then in where i write the code?

Bzz2745 commented 2 years ago

@Bzz2745 oke i already close the cmd and then in where i write the code?

it has already told you,C:\Users\user\labelimg-master\labelimg.py in function init line213

Ichalfians commented 2 years ago

@Bzz2745 NOWAYYY I DID IT IT WORKS BUT, i found new problem, would you like to help me? image

Bzz2745 commented 2 years ago

i really haven't met this error,sorry about that.

Bzz2745 commented 2 years ago
Bzz2745 commented 2 years ago

@Bzz2745 NOWAYYY I DID IT IT WORKS BUT, i found new problem, would you like to help me? image

image i just reset it,but haven't met this error....

caschb commented 2 years ago

@Bzz2745 NOWAYYY I DID IT IT WORKS BUT, i found new problem, would you like to help me? image

You have to changes lines 168 and 179 from if Qt.RightButton & ev.buttons() to if Qt.RightButton & int(ev.buttons()) in libs/canvas.py