Avaiga / taipy-doc

Holds the documentation set for Taipy, not including the code documentation obviously.
https://docs.taipy.io/
Apache License 2.0
12 stars 14 forks source link

BUG- Syntax Error - Cycles and Scopes #766

Closed Forchapeatl closed 8 months ago

Forchapeatl commented 8 months ago

Bug description

From this tutorial we are given the functions to get all the scenarios in the Cycle and get the primary scenario of the Cycle with the functions tp.get_scenarios(cycle=<Cycle>) and tp.get_primary(<Cycle>) respectively. The code on the tutorial produces a syntax error.

Even after importing the Cycle library

from taipy.core import   Cycle

I can't seem to get the id of the Cycle. I am using the same code on the tutorial . @trgiangdo , @jrobinAV please help me clarify this issue, I am not very clear on how to use these functions : _tp.get_primary(<Cycle>) and tp.get_scenarios(cycle=<Cycle>)_ .

Screenshots

image

trgiangdo commented 8 months ago

The <Cycle> here must be a cycle entity.

Please take a look at the document page on https://docs.taipy.io/en/latest/manuals/core/entities/scenario-cycle-mgt/#cycle-attributes to see when a cycle entity is created and how to get one.