Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

Compatibility Issue with `comtypes` in Experimental Build

Open Mukku27 opened this issue 1 year ago • 1 comments

Issue Title: Compatibility Issue with comtypes in Experimental Build

Description:

When attempting to execute the experimental build of the Deep-Live-Cam project using the command:

python run.py --execution-provider cuda

I encounter the following traceback error:

Traceback (most recent call last):
  File "C:\Users\megam\Downloads\Deep-Live-Cam-experimental\run.py", line 3, in <module>
    from modules import core
  File "C:\Users\megam\Downloads\Deep-Live-Cam-experimental\modules\core.py", line 21, in <module>
    import modules.ui as ui
  File "C:\Users\megam\Downloads\Deep-Live-Cam-experimental\modules\ui.py", line 9, in <module>
    from pygrabber.dshow_graph import FilterGraph
  File "C:\Users\megam\AppData\Local\Programs\Python\Python310\lib\site-packages\pygrabber\dshow_graph.py", line 40, in <module>
    from comtypes import GUID, COMError, COMObject, client
  File "C:\Users\megam\AppData\Local\Programs\Python\Python310\lib\site-packages\comtypes\__init__.py", line 375
    except COMError, err:
           ^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

Steps to Reproduce:

  1. Clone the Deep-Live-Cam-experimental repository.
  2. Run the experimental build with the --execution-provider cuda flag.
  3. Observe the traceback error in the console output.

Expected Behavior:

The script should execute without encountering a syntax error related to the comtypes library.

Actual Behavior:

The script fails to run due to a SyntaxError in the comtypes library, which is a result of incorrect exception handling syntax.

Environment:

  • OS: Windows 10
  • Python Version: 3.10
  • Deep-Live-Cam Version: Experimental Build

Mukku27 avatar Aug 18 '24 09:08 Mukku27

experimental build works fine for me on Windows 10 w/ CUDA.

Your error references line 375 in comtypes\init.py, which indicates you're running version 1.4.4 or older (the latest is 1.4.6)

Try updating comtypes and see if that fixes it

jayasafunctionofe avatar Aug 19 '24 21:08 jayasafunctionofe