-
This error occurs after page.add of several controls. E.g. When I remove this page.add the same error occurs after some other update(). Debug trace (The page.add of the code above happens at line 280): Future exception was never retrieved Process finished with exit code 0 |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Additional information. The error is originating in the encode method of the EmbedJsonEncoder in module embed_json_encoder.py.
The following lines are printed: Furtermode: the app seems to run ok when this try-except is in place. |
Beta Was this translation helpful? Give feedback.
-
Further investigation shows that the circular reference occurs due to item[1] being equal to ('bgcolor', ('primarycontainer', False)) |
Beta Was this translation helpful? Give feedback.
-
The quick fix for now is catching the value error due to circular reference which for my app seems to have no further negative consequences: def encode(self, o): |
Beta Was this translation helpful? Give feedback.
-
Please share some runnable code to test the issue. |
Beta Was this translation helpful? Give feedback.
-
I was trying to find a minimal example to share as runnable coude when I found out what was wrong. class ImageFileField(ft.Container):
As it turns out the error occurs because I named the instance of Image self.image. As it happens image is an existing property of Container. So the solution was simply to rename it and everything works fine... So its my bad and not a Flet error ;) |
Beta Was this translation helpful? Give feedback.
I was trying to find a minimal example to share as runnable coude when I found out what was wrong.
I initalized a class follows:
class ImageFileField(ft.Container):
As it turns out the error occurs because I named the instance of Image self.image. As it happens image is an existing property of Container. So the solution was simply to rename it and everything works fine...
So its my bad and not a Flet error ;)