deepfakes / faceswap

Deepfakes Software For All
https://www.faceswap.dev
GNU General Public License v3.0
52.05k stars 13.18k forks source link

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

Closed zhidaoai closed 8 months ago

zhidaoai commented 8 months ago

Note: For general usage questions and help, please use either our FaceSwap Forum or FaceSwap Discord server. General usage questions are liable to be closed without response.

Crash reports MUST be included when reporting bugs.

Describe the bug python setup.py /data/xu/faceswap/setup.py:18: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import parse_requirements Traceback (most recent call last): File "/data/xu/faceswap/setup.py", line 20, in from lib.logger import log_setup File "/data/xu/faceswap/lib/logger.py", line 425, in def _stream_handler(loglevel: int, is_gui: bool) -> logging.StreamHandler | TqdmHandler: TypeError: unsupported operand type(s) for |: 'type' and 'type'

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Crash Report The crash report generated in the root of your Faceswap folder

zhidaoai commented 8 months ago

python faceswap.py gui First time configuration. Please select the required backend 1: CPU, 2: DIRECTML, 3: NVIDIA, 4: APPLE SILICON, 5: ROCM: 3 Faceswap config written to: /data/xu/faceswap/config/.faceswap Setting Faceswap backend to NVIDIA Traceback (most recent call last): File "/data/xu/faceswap/faceswap.py", line 12, in from lib.cli import args as cli_args # pylint:disable=wrong-import-position File "/data/xu/faceswap/lib/cli/args.py", line 18, in from .actions import (DirFullPaths, DirOrFileFullPaths, DirOrFilesFullPaths, FileFullPaths, File "/data/xu/faceswap/lib/cli/actions.py", line 49, in class FileFullPaths(_FullPaths): File "/data/xufaceswap/lib/cli/actions.py", line 72, in FileFullPaths def init(self, *args, filetypes: str | None = None, **kwargs) -> None: TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

zhidaoai commented 8 months ago

No display detected. GUI mode has been disabled.

torzdf commented 8 months ago

Your Python version is too old. Use the installer in releases and you will not have this problem.

zhidaoai commented 8 months ago

install python=3.10.13, but

python faceswap.py gui
Setting Faceswap backend to NVIDIA
02/01/2024 09:34:35 INFO     Log level set to: INFO
02/01/2024 09:34:37 ERROR    No display detected. GUI mode has been disabled.
torzdf commented 8 months ago

Use the installer.

We do not support custom install paths.

https://github.com/deepfakes/faceswap/releases

zhidaoai commented 8 months ago

GPU single , nvidia T4, Linux/Centos service

torzdf commented 8 months ago

This makes no difference to me.

Either you know what you are doing with Python and can troubleshoot issues yourself, in which case by all means, install how you see fit.

Otherwise, you do not know how to troubleshoot these issues yourself and need help. In these instances we will only provide support if you use our installers.

It is too much of a burden to support anyone's and everyone's esoteric custom installation methods.

There is an installer for Linux at the link I posted above.

zhidaoai commented 8 months ago

i tried the bash ./faceswap_setup_x64.sh bug got

ERROR   This install script should not be run with root privileges. Please
ERROR   run as a normal user.