rasa
rasa copied to clipboard
Check model is not `None` before loading metadata from storage
Sentry Issue: RASA-OPEN-SOURCE-HXX
ValueError: nothing to open (4 additional frame(s) were not displayed)
...
File "rasa__main__.py", line 121, in main
cmdline_arguments.func(cmdline_arguments)
File "rasa\cli\shell.py", line 112, in shell
metadata = LocalModelStorage.metadata_from_archive(model)
File "rasa\engine\storage\local_model_storage.py", line 75, in metadata_from_archive
cls._extract_archive_to_directory(model_archive_path, temporary_directory)
File "rasa\engine\storage\local_model_storage.py", line 84, in _extract_archive_to_directory
with TarSafe.open(model_archive_path, mode="r:gz") as tar:
Definition of Done
Is this issue still valid? I would like to work on it!
We already raise ModelNotFound exception when local model is None (see here) so the output model will never be None when LocalModelStorage.metadata_from_archive(model)
is called.
Upon closer inspection of the Sentry error stack trace, it actually seems that the ValueError(nothing to open)
is raised in the context manager Tarsafe.open
and that happens only when the argument name is not provided, however we do provide this so I believe this error could be caused by custom code rather than a bug in the public codebase.