Error in loading flow data and model [Update: Resolved]

Hi, could someone please review this following error and let me know why this issue is occurring.

[2024-09-30 16:55:53 +0530] [780] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/flows'
Traceback (most recent call last):
  File "handle_request", line 96, in handle_request
  File "C:\Users\MuhammedMuzzammil\Desktop\rasa-pro\venv\lib\site-packages\rasa\server.py", line 267, in decorated
    return await result if isawaitable(result) else result
  File "C:\Users\MuhammedMuzzammil\Desktop\rasa-pro\venv\lib\site-packages\rasa\server.py", line 1430, in get_flows
    flows = await processor.get_flows()
AttributeError: 'NoneType' object has no attribute 'get_flows'
2024-09-30 16:55:55 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 16:55:55 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 16:55:56 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 16:55:56 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.

My Rasa server is up and running, but it is showing the following exception before the error shown above:

rasa.engine.exceptions.GraphComponentException: Error initializing graph component for node flows_provider.

Is there more to this error message, anything related to unicode? Thanks.

Ohh yes actually, You are exactly right. This is the entire error message just before the one I’ve pasted above:

PS C:\Users\Muzzammil\Desktop\rasa-pro-dev\calm-dev-1> rasa inspect 
C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\pydantic\_internal\_config.py:322: UserWarning: Valid config keys have changed in V2:
* 'underscore_attrs_are_private' has been removed
  warnings.warn(message, UserWarning)
2024-09-30 18:46:15 INFO     rasa.tracing.config  - No endpoint for tracing type available in endpoints.yml,tracing will not be configured.
2024-09-30 18:46:18 INFO     root  - Connecting to channel 'rasa.core.channels.development_inspector.DevelopmentInspectInput' which was specified by the '--connector' argument. Any other channels will be ignored. To connect to all given channels, omit the '--connector' argument.
2024-09-30 18:46:18 INFO     root  - Starting Rasa server on http://0.0.0.0:5005
2024-09-30 18:46:23 INFO     rasa.core.processor  - Loading model models\20240930-184521-daring-camera.tar.gz...
2024-09-30 18:46:23 ERROR    rasa.core.agent  - Could not load model due to Error initializing graph component for node flows_provider..
Traceback (most recent call last):
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\graph.py", line 435, in _load_component
    self._component: GraphComponent = constructor(  # type: ignore[no-redef]
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\graph_components\providers\flows_provider.py", line 52, in load
    flows = YAMLFlowsReader.read_from_file(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\shared\core\flows\yaml_flows_io.py", line 44, in read_from_file
    return cls.read_from_string(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\shared\core\flows\yaml_flows_io.py", line 221, in read_from_string
    validate_yaml_with_jsonschema(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\shared\utils\yaml.py", line 854, in validate_yaml_with_jsonschema
    source_data = read_yaml(yaml_file_content, reader_type=["safe", "rt"])
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\shared\utils\yaml.py", line 438, in read_yaml
    .decode("raw_unicode_escape")
UnicodeDecodeError: 'rawunicodeescape' codec can't decode bytes in position 1691-1692: truncated \UXXXXXXXX escape

Here it is^ The rest is continued here,

The above exception was the direct cause of the following exception:
 
Traceback (most recent call last):
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\core\agent.py", line 258, in load_agent
    agent.load_model(model_path)
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\core\agent.py", line 360, in load_model
    self.processor = MessageProcessor(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\core\processor.py", line 128, in __init__
    self.model_filename, self.model_metadata, self.graph_runner = self._load_model(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\core\processor.py", line 166, in _load_model
    metadata, runner = loader.load_predict_graph_runner(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\loader.py", line 29, in load_predict_graph_runner
    runner = graph_runner_class.create(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\runner\dask.py", line 53, in create
    return cls(graph_schema, model_storage, execution_context, hooks)
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\runner\dask.py", line 39, in __init__
    self._instantiated_nodes: Dict[Text, GraphNode] = self._instantiate_nodes(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\runner\dask.py", line 62, in _instantiate_nodes
    return {
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\runner\dask.py", line 63, in <dictcomp>
    node_name: GraphNode.from_schema_node(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\graph.py", line 611, in from_schema_node
    return cls(
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\graph.py", line 422, in __init__
    self._load_component()
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\engine\graph.py", line 448, in _load_component
    raise GraphComponentException(
rasa.engine.exceptions.GraphComponentException: Error initializing graph component for node flows_provider.
2024-09-30 18:46:23 INFO     root  - Rasa server is up and running.
[2024-09-30 18:46:24 +0530] [13496] [INFO] Starting worker [13496]
2024-09-30 18:46:24 INFO     sanic.server  - Starting worker [13496]
[2024-09-30 18:46:25 +0530] [13496] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/flows'
Traceback (most recent call last):
  File "handle_request", line 96, in handle_request
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\server.py", line 267, in decorated
    return await result if isawaitable(result) else result
  File "C:\Users\Muzzammil\Desktop\rasa-pro-dev\venv\lib\site-packages\rasa\server.py", line 1430, in get_flows
    flows = await processor.get_flows()
AttributeError: 'NoneType' object has no attribute 'get_flows'
2024-09-30 18:46:27 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 18:46:27 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 18:46:28 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 18:46:28 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 18:46:30 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 18:46:30 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 18:46:31 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
2024-09-30 18:46:31 ERROR    rasa.server  - No agent loaded. To continue processing, a model of a trained agent needs to be loaded.
[2024-09-30 18:46:31 +0530] [13496] [INFO] Stopping worker [13496]

Any explanation as to how I can resolve this would be deeply appreciated, thank you.

SOLUTION TO THIS HAS BEEN ADDED HERE :slight_smile: