hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
34.88k stars 4.92k forks source link

Compatibility Issue with `comtypes` in Experimental Build #394

Open Mukku27 opened 3 weeks ago

Mukku27 commented 3 weeks ago

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:

jayasafunctionofe commented 3 weeks ago

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