From 448cf7fd591ec44ef7ff06e1eff5e77762f568f5 Mon Sep 17 00:00:00 2001 From: Keval Pandya <62025534+Keval-pandya@users.noreply.github.com> Date: Thu, 16 Nov 2023 17:28:03 +0530 Subject: [PATCH 1/2] Update EasyOCRLabel.py for lastet pyqt --- EasyOCRLabel.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/EasyOCRLabel.py b/EasyOCRLabel.py index 3db9ea5..9c0c8b4 100644 --- a/EasyOCRLabel.py +++ b/EasyOCRLabel.py @@ -1417,17 +1417,18 @@ def _get_rgb_by_label(self, label, kie_mode): def scrollRequest(self, delta, orientation): units = - delta / (8 * 15) bar = self.scrollBars[orientation] - bar.setValue(bar.value() + bar.singleStep() * units) + + bar.setValue(int(bar.value() + bar.singleStep() * units)) def setZoom(self, value): self.actions.fitWidth.setChecked(False) self.actions.fitWindow.setChecked(False) self.zoomMode = self.MANUAL_ZOOM - self.zoomWidget.setValue(value) + self.zoomWidget.setValue(int(value)) def addZoom(self, increment=10): self.setZoom(self.zoomWidget.value() + increment) - self.imageSlider.setValue(self.zoomWidget.value() + increment) # set zoom slider value + self.imageSlider.setValue(int(self.zoomWidget.value() + increment)) # set zoom slider value def zoomRequest(self, delta): # get the current scrollbar positions @@ -1467,7 +1468,7 @@ def zoomRequest(self, delta): # zoom in units = delta / (8 * 15) scale = 10 - self.addZoom(scale * units) + self.addZoom(int(scale * units)) # get the difference in scrollbar values # this is how far we can move @@ -1478,8 +1479,8 @@ def zoomRequest(self, delta): new_h_bar_value = h_bar.value() + move_x * d_h_bar_max new_v_bar_value = v_bar.value() + move_y * d_v_bar_max - h_bar.setValue(new_h_bar_value) - v_bar.setValue(new_v_bar_value) + h_bar.setValue(int(new_h_bar_value)) + v_bar.setValue(int(new_v_bar_value)) def setFitWindow(self, value=True): if value: From ea89ef78efc01bc3d7bae34f4c9af7f5f57457f1 Mon Sep 17 00:00:00 2001 From: Keval Pandya <62025534+Keval-pandya@users.noreply.github.com> Date: Thu, 16 Nov 2023 17:29:19 +0530 Subject: [PATCH 2/2] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index cb6a855..ad29207 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +opencv-python-headless # installing the opencv-python-headless for xcd error in pyqt pyqt5 easyocr xlrd==1.2.0