Skip to content

Error after upgrading to 0.24: ValueError: Circular reference detected #3912

Closed Answered by mvwilpe
mvwilpe asked this question in Q&A
Discussion options

You must be logged in to vote

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):

def __init__(self) -> None:
    super().__init__()

    self.label = "some label"
    self.file_name: ft.Text = ft.Text()
    self.image: ft.Image = ft.Image()
    self.content = ft.Container(
        content=self.image
    )

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 ;)

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ndonkoHenri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants