Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

Job not found , Task not found , DataNode not found: #369

Closed Forchapeatl closed 10 months ago

Forchapeatl commented 10 months ago

Hello everyone , I followed the geting started tutorial on the official taipy docs

my code looks like this:

from taipy import Config , Core , Gui
import taipy as tp

page = """
Name: <|{input_name}|input|>
<|submit|button|on_action=submit_scenario|>

Message: <|{message}|text|>
"""

input_name = "Taipy"
message = None

def submit_scenario(state):
    state.scenario.input_name.write(state.input_name)
    state.scenario.submit(wait=True)
    state.message = scenario.message.read()

def build_message(name: str):
    return f"Hello {name}!"

input_name_data_node_cfg = Config.configure_data_node(id="input_name")
message_data_node_cfg = Config.configure_data_node(id="message")
build_msg_task_cfg = Config.configure_task("build_msg", build_message, input_name_data_node_cfg, message_data_node_cfg)
scenario_cfg = Config.configure_scenario("scenario", task_configs=[build_msg_task_cfg])

hello_scenario = tp.create_scenario(scenario_cfg)
hello_scenario.input_name.write("Taipy")
hello_scenario.submit()
print(hello_scenario.message.read())

if __name__ == "__main__":
    Core().run()
    scenario = tp.create_scenario(scenario_cfg)
    Gui(page).run()

The code is working as expected

image

but gives errors like job , task , dataNode Not found. I just wanted to post it here it case this is a bug.

[2023-10-31 09:18:06][Taipy][WARNING] JOB_build_msg_6614d2a3-5d3c-45b0-958e-e42cc2e24136 is not in the blocked list anymore.
[2023-10-31 09:18:06][Taipy][ERROR] Job not found: JOB_build_msg_6614d2a3-5d3c-45b0-958e-e42cc2e24136
[2023-10-31 09:18:06][Taipy][ERROR] DataNode not found: DATANODE_message_acec24e9-240a-4f28-bfa2-57d56212322d
[2023-10-31 09:18:06][Taipy][ERROR]  1 errors occurred during execution of job JOB_build_msg_6614d2a3-5d3c-45b0-958e-e42cc2e24136
[2023-10-31 09:18:06][Taipy][ERROR] Traceback (most recent call last):
  File "/home/pearl/Documents/mlh/unvs/venv/lib/python3.8/site-packages/taipy/core/_orchestrator/_dispatcher/_task_function_wrapper.py", line 39, in _wrapped_function
    results = fct(*cls.__read_inputs(inputs))
  File "/home/pearl/Documents/mlh/unvs/venv/lib/python3.8/site-packages/taipy/core/_orchestrator/_dispatcher/_task_function_wrapper.py", line 47, in __read_inputs
    return [data_manager._get(dn.id).read_or_raise() for dn in inputs]
  File "/home/pearl/Documents/mlh/unvs/venv/lib/python3.8/site-packages/taipy/core/_orchestrator/_dispatcher/_task_function_wrapper.py", line 47, in <listcomp>
    return [data_manager._get(dn.id).read_or_raise() for dn in inputs]
AttributeError: 'NoneType' object has no attribute 'read_or_raise'

[2023-10-31 09:18:08][Taipy][INFO]  * Server starting on http://127.0.0.1:5000
Forchapeatl commented 10 months ago

i took out these lines and the error stoped.

input_name_data_node_cfg = Config.configure_data_node(id="input_name")
message_data_node_cfg = Config.configure_data_node(id="message")
build_msg_task_cfg = Config.configure_task("build_msg", build_message, input_name_data_node_cfg, message_data_node_cfg)
scenario_cfg = Config.configure_scenario("scenario", task_configs=[build_msg_task_cfg])

my mistake