I am a beginner and have a problem after installing pycaw for the audio control using python, on putting the basic initialization code for pycaw, i get the following error:-
Traceback (most recent call last):File "c:\Users\...\volumeControl.py", line 7, in <module>from comtypes import CLSCTX_ALLFile "C:\...\env\lib\site-packages\comtypes\__init__.py", line 375except COMError, err:^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
Basic initialization:-
from ctypes import cast, POINTER
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolumedevices = AudioUtilities.GetSpeakers()
interface = devices.Activate(IAudioEndpointVolume._iid_, CLSCTX_ALL, None)
volume = cast(interface, POINTER(IAudioEndpointVolume))
I tried searching for this all over the web but could not find a fix
I also trying going into the module file inside the virtual env and parenthize by putting brackets around COMError, err
But same error with other lines in code came,
Also tried reinstalling pycaw and trying to install different versions of pycaw several times but nothing fixed
How to fix this error?