TangleSpace / hydralit

A library to create multi-page Streamlit applications with ease.
Apache License 2.0
202 stars 19 forks source link

AttributeError in add_app Method when Using Hydralit #55

Closed kyo-primary closed 5 months ago

kyo-primary commented 5 months ago

AttributeError in add_app Method when Using Hydralit

Description

I encountered an issue while using the add_app method in Hydralit, resulting in an AttributeError. This problem occurs specifically when trying to add applications to the HydraApp instance. Below are the details of the error and the environment in which it occurs.

Steps to Reproduce

  1. Initialize a HydraApp instance.
  2. Attempt to add an app using app.add_app("App Title", app_function).
  3. Encounter the AttributeError on running the application.

Expected Behavior

The application should be added to the HydraApp without any errors, allowing for seamless navigation between different apps.

Actual Behavior

An AttributeError is thrown, stating:

AttributeError: 'function' object has no attribute 'assign_session'

Environment

Additional Context

Please include any additional information that might be helpful for diagnosing the issue, such as code snippets or screenshots.

Thank you for looking into this issue!

Best regards, [Kyo]

BizAI3000 commented 5 months ago

this isn't an error, this is you not reading the documentation, add_app is a decorator

BizAI3000 commented 5 months ago

and the add_app you are using requires a class instance derived from HydraHeadApp

kyo-primary commented 5 months ago

and the add_app you are using requires a class instance derived from HydraHeadApp

I had misunderstood. Thank you for the explanatio