Avaiga / taipy-core

A Python library to build powerful and customized data-driven back-end applications.
Apache License 2.0
38 stars 17 forks source link

BUG-Logger throws incorrect errors on Data Node #790

Closed FlorianJacta closed 1 year ago

FlorianJacta commented 1 year ago

Description When creating a scenario, the logger produces incorrect errors in the console :

[2023-10-13 11:50:22][Taipy][ERROR] DataNode not found: DATANODE_input_51d812e2-ad39-4dbe-9cdb-331240fb720f

How to reproduce

Run this code

from taipy import Config

import taipy as tp
import pandas as pd

def identity(input):
    print("     Identity")
    return input

## Input Data Nodes
input_cfg = Config.configure_data_node(id="input", default_data=2)

## Remaining Data Node
output_cfg = Config.configure_data_node(id="output")

# Task config objects
identity_task_cfg = Config.configure_task(id="identity",
                                            function=identity,
                                            input=input_cfg,
                                            output=output_cfg,
                                            skippable=True)

# Configure our scenario config.
scenario_cfg = Config.configure_scenario(id="my_scenario", task_configs=[identity_task_cfg])

tp.create_scenario(scenario_cfg)

Expected behavior We should not get these errors in the console.

Runtime environment

jrobinAV commented 1 year ago

When a default value is provided to a data node config, when creating the data node for the first time, we write the data and track edit before saving the data node which is correct. When we track edit, we auto reload the data node that is not saved yet, which triggers a log error. Then we save the data node missing the edit from the default value.

Should be fixed soon.