Avaiga / taipy-core

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

BUG-cannot create scenario with label containing accented char like é à #780

Closed FredLL-Avaiga closed 10 months ago

FredLL-Avaiga commented 11 months ago

Description cannot create scenario with label containing accented char like é à

How to reproduce

Expected behavior Either the scenario is created or an explicit error is shown

Runtime environment Please specify relevant indications.

toan-quach commented 11 months ago

@FredLL-Avaiga hmmm I was able to create a scenario using this code fragment:

import taipy as tp
from taipy import Config

scenario_config = Config.configure_scenario("scenario_1")
scenario = tp.create_scenario(scenario_config, name = "Frédéric")

print(scenario)   # Frédéric
print(scenario.name)   # Frédéric

So not sure what the problem is, can you help explain it in more details?

FredLL-Avaiga commented 11 months ago

I tried through the UI ...

toan-quach commented 11 months ago

Do we know the input value going into core? might be due to different encoding mechanism as well?

FredLL-Avaiga commented 11 months ago

When I create a Scenario with name="a", it is listed by the get_cycles_scenarios() When I create a Scenario with name="é", it is not listed by the get_cycles_scenarios() If I call tp.get_scenarios() or tp.get_cycles_scenarios() straight after the creation It is NOT in there ...

import taipy as tp
from taipy import Config

scenario_config = Config.configure_scenario("scenario_1")
scenario = tp.create_scenario(scenario_config, name="Frédéric")

print(scenario)  # Frédéric
print(scenario.name)  # Frédéric

a = tp.get_cycles_scenarios()

print(f"{a}")

So it looks like it's an issue with tp.get_cycles_scenarios() ? after a second look, same thing with tp.get_scenarios() it's empty