Open Rahul-Choudhary-3614 opened 3 years ago
I got an error too:
TypeError Traceback (most recent call last) /Users/kinbunhua/cds522/chatbot/horoscope_bot/building-chatbots-with-python-master/Chapter IV/horoscope_bot/rasa-nlu.ipynb Cell 2 in <cell line: 1>() ----> 1 train_horoscopebot('./data/data.json', 'config.json', './models/nlu')
/Users/kinbunhua/cds522/chatbot/horoscope_bot/building-chatbots-with-python-master/Chapter IV/horoscope_bot/rasa-nlu.ipynb Cell 2 in train_horoscopebot(data_json, config_file, model_dir) 7 def train_horoscopebot(data_json, config_file, model_dir): 8 training_data = load_data(data_json) ----> 9 trainer = Trainer(config.load(config_file)) 10 trainer.train(training_data) 11 model_directory = trainer.persist(model_dir, fixed_model_name = 'horoscopebot')
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/rasa_nlu/config.py:44, in load(filename, **kwargs) 42 if filename is not None: 43 try: ---> 44 file_config = utils.read_yaml_file(filename) 45 except yaml.parser.ParserError as e: 46 raise InvalidConfigError("Failed to read configuration file " 47 "'{}'. Error: {}".format(filename, e))
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/rasa_nlu/utils/init.py:236, in read_yaml_file(filename) 234 def read_yaml_file(filename): 235 fix_yaml_loader() --> 236 return yaml.load(read_file(filename, "utf-8"))
TypeError: load() missing 1 required positional argument: 'Loader'
Did you install all the libraries with the exact version specific in the book? Can you ensure it matches exactly the same version as it is backward incompatible.
the version of rasa-nlu is 0.13.2
TypeError Traceback (most recent call last)