8000 TypeError: load() missing 1 required positional argument: 'Loader' · Issue #17 · kylekma/X2CT · GitHub
[go: up one dir, main page]

Skip to content

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

Open

Description

@mohammadnabeel

Hello!

I tried the file Test.py by using:
test.py --ymlpath=./experiment/singleview2500/d2_singleview2500.yml --gpu=0 --dataroot=./data/LIDC-HDF5-256 --dataset=test --tag=d2_singleview2500 --data=LIDC256 --dataset_class=align_ct_xray_std --model_class=SingleViewCTGAN --datasetfile=./data/test.txt --resultdir=./singleview --check_point=30 --how_many=3

and I always get the error TypeError: load() missing 1 required positional argument: 'Loader'
I tried to have the version of 5.4.1 for pyYAML, but I couldn't!! (I read that this might by the solution on some websites)
Anyone can help?

Activity

  1. yinyin-llll commented on May 9, 2023

    @yinyin-llll

    you can try this:

    import yaml

    def cfg_from_yaml(ymlpath):
    with open(ymlpath, 'r') as f:
    yaml_cfg = yaml.load(f, Loader=yaml.FullLoader) # add Loader parameter

  2. WesleyWu42 commented on Mar 9, 2024

    @WesleyWu42

    change the load() to safe_load(),new version of yaml has changed the usage of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0