Avaiga / taipy-gui

Graphical User Interface generator for Taipy
Apache License 2.0
60 stars 20 forks source link

BUG-Gui Builder error on reload #945

Closed dinhlongviolin1 closed 1 year ago

dinhlongviolin1 commented 1 year ago

Description When a taipy gui builder page is reloaded, the page is not accessible due to some parsing issue.

How to reproduce A code fragment

import pandas as pd
from datetime import datetime
import src.taipy.gui.builder as tgb
from src.taipy.gui import Gui

start_date = datetime(2023, 1, 1)
end_date = datetime(2023, 2, 1)
date_range = pd.date_range(start=start_date, end=end_date)

df = pd.DataFrame({'Date': date_range})
df["Index"] = df.index

text = 10

def on_edit(state, var_name, action, payload):
    print(var_name, action, payload)

with tgb.Page() as page:
    tgb.text("{text}")
    tgb.table(data="{df}", editable=True, filter=True, on_edit=on_edit)

Gui(page=page).run()

Expected behavior User should be able to reload the page

Screenshots When available and relevant, screenshots better help show the problem.

Runtime environment Please specify relevant indications.