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: expected str, bytes or os.PathLike object, not NoneType #11

Open
mongboy1 opened this issue Sep 20, 2022 · 0 comments
Open

Comments

@mongboy1
Copy link

Traceback (most recent call last):
File "c:/Users/최현석/OneDrive/바탕 화면/AdaSpeech-master/AdaSpeech-master/nvidia_preprocessing.py", line 96, in
hp = HParam(args.config)
File "c:\Users\최현석\OneDrive\바탕 화면\AdaSpeech-master\AdaSpeech-master\utils\hparams.py", line 58, in init
hp_dict = load_hparam(file)
File "c:\Users\최현석\OneDrive\바탕 화면\AdaSpeech-master\AdaSpeech-master\utils\hparams.py", line 16, in load_hparam
stream = open(filename)

My code is here.

  1. line96 (( hp = HParam(args.config) ))

if name == "main":
parser = argparse.ArgumentParser()
parser.add_argument(
"-d", "--data_path", type=str, help="root directory of wav files"
)
parser.add_argument(
"-c", "--config", type=str, help="yaml file for configuration"
)
args = parser.parse_args()

hp = HParam(args.config)

main(args, hp)
  1. line 16 (( stream = open(filename, "r") ))

def load_hparam(filename):
stream = open(filename, "r")
docs = yaml.load_all(stream, Loader=yaml.Loader)
hparam_dict = dict()
for doc in docs:
for k, v in doc.items():
hparam_dict[k] = v
return hparam_dict

  1. line 58 (( hp_dict = load_hparam(file) ))

class HParam(Dotdict):
def init(self, file):
super(Dotdict, self).init()
hp_dict = load_hparam(file)
hp_dotdict = Dotdict(hp_dict)
for k, v in hp_dotdict.items():
setattr(self, k, v)

__getattr__ = Dotdict.__getitem__
__setattr__ = Dotdict.__setitem__
__delattr__ = Dotdict.__delitem__

How can I solve this problem?

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

1 participant