Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
molokanov50 opened this issue Feb 15, 2024 · 2 comments
Open

Comments

@molokanov50
Copy link

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
Copy link

you can solve it by answering ChatGPT

@stddio
Copy link

stddio commented Mar 9, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants