megvii-research / CADDM

Official implementation of ID-unaware Deepfake Detection Model
Apache License 2.0
157 stars 21 forks source link

TypeError: load() missing 1 required positional argument: 'Loader' #36

Open molokanov50 opened 9 months ago

molokanov50 commented 9 months ago

I run python test.py --cfg ./configs/caddm_test.cfg as is indicated in your readme, and I expect a successful completion of evaluation task. Instead, I got an error:

(caddm) molokanov@molokanov-pc:~/CADDM$ python test.py --cfg ./configs/caddm_test.cfg
Traceback (most recent call last):
  File "test.py", line 83, in <module>
    test()
  File "test.py", line 41, in test
    cfg = load_config(args.cfg)
  File "/home/molokanov/CADDM/lib/util.py", line 10, in load_config
    config = yaml.load(f)
TypeError: load() missing 1 required positional argument: 'Loader'

My conda env is as follows:

dlib              19.24.2    
imutils           0.5.4      
joblib            1.3.2      
numpy             1.19.5     
opencv-python     4.9.0.80   
pillow            10.2.0     
pip               20.0.2     
pkg-resources     0.0.0      
scikit-learn      1.3.2      
scipy             1.10.1     
setuptools        44.0.0     
threadpoolctl     3.3.0      
torch             1.8.1+cu101
torchaudio        0.8.1      
torchvision       0.9.1+cu101
tqdm              4.66.2     
typing-extensions 4.9.0

Can you help me?

Sun-researcher commented 9 months ago

you can solve it by answering ChatGPT

stddio commented 8 months ago

Maybe you can solve it by one of following methods:

d1 = yaml.load(file, Loader=yaml.FullLoader)
d1 = yaml.safe_load(file)
d1 = yaml.load(file, Loader=yaml.CLoader)