Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Solve Type Error in scroll_request method #982

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 27, 2023

  1. Solve Type Error in scroll_request method

    The following error occurs in `scroll_request` method:
    ```
    Traceback (most recent call last):
      File "C:\Users\SohangChopra\AppData\Local\Programs\Python\Python311\Lib\site-packages\labelImg\labelImg.py", line 965, in scroll_request
        bar.setValue(bar.value() + bar.singleStep() * units)
    TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'
    ```
    This is because ` units = - delta / (8 * 15)` is a `float`, so `bar.value() + bar.singleStep() * units` is also coerced to a `float`. The solution is to use `//` (integer division) instead of `/`.
    sohang3112 committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    b8505c7 View commit details
    Browse the repository at this point in the history