I've Been Recently Learning Computer Vision using python to my robotic arm project. So when making a hand detector project, I encountered this error :
Traceback (most recent call last):
File "C:\Users\lenovo pc\PycharmProjects\GestureRobotArmControl\GestureControlArm.py", line 6, in <module>
detector = HandDetector(maxHands=1, detectionCon=0.7)
File "C:\Users\lenovo pc\PycharmProjects\GestureRobotArmControl\venv\lib\site-packages\cvzone\HandTrackingModule.py", line 33, in __init__
self.hands = self.mpHands.Hands(self.mode, self.maxHands,
File "C:\Users\lenovo pc\PycharmProjects\GestureRobotArmControl\venv\lib\site-packages\mediapipe\python\solutions\hands.py", line 114, in __init__
super().__init__(
File "C:\Users\lenovo pc\PycharmProjects\GestureRobotArmControl\venv\lib\site-packages\mediapipe\python\solution_base.py", line 289, in __init__
self._input_side_packets = {
File "C:\Users\lenovo pc\PycharmProjects\GestureRobotArmControl\venv\lib\site-packages\mediapipe\python\solution_base.py", line 290, in <dictcomp>
name: self._make_packet(self._side_input_type_info[name], data)
File "C:\Users\lenovo pc\PycharmProjects\GestureRobotArmControl\venv\lib\site-packages\mediapipe\python\solution_base.py", line 592, in _make_packet
return getattr(packet_creator, 'create_' + packet_data_type.value)(data)
TypeError: create_int(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> mediapipe.python._framework_bindings.packet.Packet
Invoked with: 0.7
And I tried Very Much Debugging it, But Not End Successfull :( So Please Help me if you can. Here is The Code That I've Written:
import cvzone
import cv2
from cvzone.HandTrackingModule import HandDetector
cap: object = cv2.VideoCapture(0)
detector = HandDetector(maxHands=1, detectionCon=0.7)
while True:
success, img = cap.read()
img = detector.findHands(img)
lmlist, bbox = detector.findPosition(img)
cv2.imshow("image", img)
cv2.waitKey(1)
I've Tried to import HandDetector from cvzone.HandTrackingModule