Closed MaxXilon closed 6 months ago
import flet as ft
def main(page):
colors=['red','blue','green']
page.add(
ft.Card(
content=ft.Text('hi'))
)
colors+=page.controls
print(colors)
page.client_storage.set("color",str(colors))
x=page.client_storage.get('color')
print (x)
ft.app(main)
Also, an example of deleting a circular reference is available in the link below: https://stackoverflow.com/questions/44777369/remove-circular-references-in-dicts-lists-tuples
Thanks 😊,
Description
Tried using the page.client_storage.set() to store a list but it returned ValueError: Circular Reference detected.
Code example to reproduce the issue:
Describe the results you received:
Describe the results you expected:
The input list displayed at the console.
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (
pip show flet
):Give your
requirements.txt
file (don'tpip freeze
, instead give direct packages):Operating system:
Linux version: Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy
Android version: 8.1.0