Skip to content

Nested data structures not connected to a State cause hard to decipher errors #6589

@bertbarabas

Description

@bertbarabas

Describe the bug
When you directly pass a python data structure (nested BaseModel) to components you will sometimes get an exception that is hard to understand. It is made more difficult to figure out because accessing some nested elements of the data structure display fine while accessing others causes the exception.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
Either a clear exception explaining how data must be associated with State or allow static data structures to be used fully without exceptions. For example you have a catalog that won't change during the session so it doesn't need to be tracked via state.

Specifics (please complete the following information):

  • Python Version: 3.14
  • Reflex Version: 0.9.3
  • OS: Ubuntu 24.04.2 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions