labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

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.

Open besbesmany opened this issue 3 years ago • 19 comments

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)

besbesmany avatar Jul 29 '21 20:07 besbesmany

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.

civecikuv avatar Jul 30 '21 10:07 civecikuv

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.

Bzz2745 avatar Sep 29 '21 04:09 Bzz2745

@Bzz2745 Worked for me, thank you!

I-Abdullah-I avatar Apr 25 '22 23:04 I-Abdullah-I

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

SaddamHosyn avatar May 05 '22 15:05 SaddamHosyn

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

IffahSaiful avatar Jun 16 '22 19:06 IffahSaiful

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!

sourabmaity avatar Jul 03 '22 08:07 sourabmaity

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

Harbednmez avatar Jul 17 '22 14:07 Harbednmez

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 avatar Jul 20 '22 05:07 Ichalfians

@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

Ichalfians avatar Jul 20 '22 05:07 Ichalfians

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......

Bzz2745 avatar Jul 20 '22 06:07 Bzz2745

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

Ichalfians avatar Jul 20 '22 06:07 Ichalfians

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....

Bzz2745 avatar Jul 20 '22 06:07 Bzz2745

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

Ichalfians avatar Jul 20 '22 06:07 Ichalfians

@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

Bzz2745 avatar Jul 20 '22 06:07 Bzz2745

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

Ichalfians avatar Jul 20 '22 06:07 Ichalfians

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

Bzz2745 avatar Jul 20 '22 06:07 Bzz2745

Bzz2745 avatar Jul 20 '22 06:07 Bzz2745

@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....

Bzz2745 avatar Jul 20 '22 06:07 Bzz2745

@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

caschb avatar Jul 21 '22 22:07 caschb