Skip to content

Commit

Permalink
Merge pull request #1038 from howl-anderson/bugfix/typos
Browse files Browse the repository at this point in the history
fix typo: UnsuportedModelError => UnsupportedModelError
  • Loading branch information
tmbo authored Apr 24, 2018
2 parents 9247867 + b07109e commit fca3708
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions rasa_nlu/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __str__(self):
return self.message


class UnsuportedModelError(Exception):
class UnsupportedModelError(Exception):
"""Raised when a model is to old to be loaded.
Attributes:
Expand Down Expand Up @@ -255,13 +255,13 @@ def ensure_model_compatibility(metadata):

model_version = metadata.get("rasa_nlu_version", "0.0.0")
if version.parse(model_version) < version.parse("0.12.0a2"):
raise UnsuportedModelError("The model version is to old to be "
"loaded by this Rasa NLU instance. "
"Either retrain the model, or run with"
"an older version. "
"Model version: {} Instance version: {}"
"".format(model_version,
rasa_nlu.__version__))
raise UnsupportedModelError(
"The model version is to old to be "
"loaded by this Rasa NLU instance. "
"Either retrain the model, or run with"
"an older version. "
"Model version: {} Instance version: {}"
"".format(model_version, rasa_nlu.__version__))

@staticmethod
def load(model_dir, component_builder=None, skip_valdation=False):
Expand Down
2 changes: 1 addition & 1 deletion tests/base/test_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_interpreter(pipeline_template, component_builder, tmpdir):
{"rasa_nlu_version": "0.10.2"},
{"rasa_nlu_version": "0.12.0a1"}])
def test_model_not_compatible(metadata):
with pytest.raises(rasa_nlu.model.UnsuportedModelError):
with pytest.raises(rasa_nlu.model.UnsupportedModelError):
Interpreter.ensure_model_compatibility(metadata)


Expand Down

0 comments on commit fca3708

Please sign in to comment.