check if core is new enough to report own version
@@ -104,19 +104,26 @@ def check_version_compatibility(core_version):
Args:
core_version - string containing the version of rasa_core that
is making the call to the action server.
- Returns:
- Nothing
"""
+ # Check for versions of core that are too old to report their version number
+ if core_version is None:
+ logger.warning("You are using an old version of rasa_core.\n"
+ "To ensure compatibility use the same version for both, "
+ "modulo the last number, i.e. using version A.B.x the numbers "
+ "A and B should be identical for both rasa_core and "
+ "rasa_core_sdk.")
+ else:
if not core_version==sdk_version:
for core_c, sdk_c in zip(core_version.split('.')[:-1],
sdk_version.split('.')[:-1]):
if core_c != sdk_c:
- logger.warning("Your version of rasa_core and rasa_core_sdk "
- "might not be compatible. You are current running rasa_core "
- "version {} and rasa_core_sdk version {}.\n"
- "To ensure compatibility use the same version for both "
- "modulo the last number, i.e. using version A.B.x the numbers "
- "A and B should be identical for both rasa_core and "
+ logger.warning("Your version of rasa_core and "
+ "rasa_core_sdk might not be compatible. You are current "
+ "running rasa_core version {} and rasa_core_sdk version {}."
+ "\n"
+ "To ensure compatibility use the same version for both, "
+ "modulo the last number, i.e. using version A.B.x the "
+ "numbers A and B should be identical for both rasa_core and"
" rasa_core_sdk.".format(core_version, sdk_version))
break
