Skip to content

Commit

Permalink
Fixed bug with an YAML exception not being processed
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Khizov committed Jun 24, 2020
1 parent 0bd3456 commit 6c7af68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rasa/nlu/training_data/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from rasa.utils.endpoints import EndpointConfig
import rasa.utils.io as io_utils
import re
import ruamel.yaml

if typing.TYPE_CHECKING:
from rasa.nlu.training_data import TrainingData
Expand Down Expand Up @@ -184,7 +185,8 @@ def guess_format(filename: Text) -> Text:
content = io_utils.read_yaml_file(filename)
if KEY_NLU in content:
guess = RASA_YAML
except ValueError:
# YAML lib isn't exposing all necessary Errors/Warnings
except Exception:
pass

logger.debug(f"Training data format of '{filename}' is '{guess}'.")
Expand Down

0 comments on commit 6c7af68

Please sign in to comment.