rasa: ImportError: cannot import name 'RasaNLUConfig'

Rasa Core version: 0.8.5

Python version: 3.6.4

Operating system (windows, osx, …): windows 10

Issue: I have recently updated to RASA NLU v0.12.0 after the update i’m getting this issue

Traceback (most recent call last):
  File ".\bot.py", line 25, in <module>
    run_bot()
  File ".\bot.py", line 16, in run_bot
    agent = Agent.load('./models/dialogue/default/dialogue_model', RasaNLUInterpreter('./models/nlu/default/nlu_model'))
  File "D:\Softwares\Python\lib\site-packages\rasa_core\interpreter.py", line 219, in __init__
    self._load_interpreter()
  File "D:\Softwares\Python\lib\site-packages\rasa_core\interpreter.py", line 234, in _load_interpreter
    from rasa_nlu.config import RasaNLUConfig
ImportError: cannot import name 'RasaNLUConfig'

I got this error while using the following method

agent = Agent.load('./models/dialogue/default/dialogue_model', RasaNLUInterpreter('./models/nlu/default/nlu_model'))

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

I ugraded to 0.9.0a2 and get:

Traceback (most recent call last):
  File "dialoguepy", line 45, in <module>
    run_bot()
  File "dialogue_management_model.py", line 35, in run_bot
    interpreter = RasaNLUInterpreter('./models/nlu/default/kk_nlu')
  File "C:\Users\Anaconda3\envs\rasa12\lib\site-packages\rasa_core\interpreter.py", line 221, in __init__
    self._load_interpreter()
  File "C:\Users\Anaconda3\envs\rasa12\lib\site-packages\rasa_core\interpreter.py", line 237, in _load_interpreter
    self.interpreter = Interpreter.load(self.model_directory)
  File "C:\Users\Anaconda3\envs\rasa12\lib\site-packages\rasa_nlu\model.py", line 272, in load
    Interpreter.ensure_model_compatibility(model_metadata)
  File "C:\Users\Anaconda3\envs\rasa12\lib\site-packages\rasa_nlu\model.py", line 264, in ensure_model_compatibility
    rasa_nlu.__version__))
rasa_nlu.model.UnsuportedModelError: The model version is to old to be loaded by this Rasa NLU instance. Either retrain the model, or run withan older version. Model version: 0.12.0a1 Instance version: 0.12.2