Page 1 of 1

TypeError: unsupported operand type(s) for |: 'type' and 'type'

Posted: Fri Nov 15, 2024 12:03 am
by ryanbin

Getting the following error when trying to run python faceswap.py -h

Traceback (most recent call last):
File "/home/ryan/faceswap/faceswap.py", line 12, in <module>
from lib.cli import args as cli_args # pylint:disable=wrong-import-position
File "/home/ryan/faceswap/lib/init.py", line 4, in <module>
from . import logger
File "/home/ryan/faceswap/lib/logger.py", line 427, in <module>
def _stream_handler(loglevel: int, is_gui: bool) -> logging.StreamHandler | TqdmHandler:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

I used the faceswap_setup_x64.sh script to install on two different machines (Ubuntu 20.04 and CentOS9) and get the exact same error.


Re: TypeError: unsupported operand type(s) for |: 'type' and 'type'

Posted: Sat Nov 16, 2024 3:45 am
by torzdf

You are using an old version of Python which means that you have probably not activated your Faceswap environment