You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i am running my code.
import time
import cv2
import numpy as np
import HandTrackingModule as htm
import mediapipe as mp
import math
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
widthCam, heightCam = 640, 480
cap = cv2.VideoCapture(0)
cap.set(3, widthCam)
cap.set(4, heightCam)
previousTime = 0
This library is supported only on the Windows operating system. It is stated in the README.md file. You can also refer to the issue COMError from '_ctypes #35
Hey!
I currently using Ubuntu 22.04 and python 3.8.
When i am running my code.
import time
import cv2
import numpy as np
import HandTrackingModule as htm
import mediapipe as mp
import math
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
widthCam, heightCam = 640, 480
cap = cv2.VideoCapture(0)
cap.set(3, widthCam)
cap.set(4, heightCam)
previousTime = 0
detector = htm.handDetector(detectionCon=0.8)
devices = AudioUtilities.GetSpeakers()
interface = devices.Activate(
IAudioEndpointVolume.iid, CLSCTX_ALL, None)
volume = interface.QueryInterface(IAudioEndpointVolume)
volume.GetMute()
volume.GetMasterVolumeLevel()
volume.GetVolumeRange()
volume.SetMasterVolumeLevel(-20.0, None)
while True:
ImportError: cannot import name 'COMError' from '_ctypes' (/usr/lib/python3.8/lib-dynload/_ctypes.cpython-38-x86_64-linux-gnu.so)
The text was updated successfully, but these errors were encountered: