Skip to content

Commit

Permalink
Merge pull request #7877 from RasaHQ/fix-issue-7069
Browse files Browse the repository at this point in the history
Update UnsupportedModelError
  • Loading branch information
rasabot authored Feb 7, 2021
2 parents c5ee208 + 5efe892 commit 78a76e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog/7069.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated error message when using incompatible model versions.
11 changes: 5 additions & 6 deletions rasa/nlu/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,11 @@ def ensure_model_compatibility(
model_version = metadata.get("rasa_version", "0.0.0")
if version.parse(model_version) < version.parse(version_to_check):
raise UnsupportedModelError(
"The model version is too 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.__version__)
f"The model version is trained using Rasa Open Source {model_version} "
f"and is not compatible with your current installation ({rasa.__version__}). "
f"This means that you either need to retrain your model "
f"or revert back to the Rasa version that trained the model "
f"to ensure that the versions match up again."
)

@staticmethod
Expand Down

0 comments on commit 78a76e2

Please sign in to comment.