AttributeError in add_app Method when Using Hydralit
kyo-primary opened this issue · 3 comments
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
- Initialize a
HydraApp
instance. - Attempt to add an app using
app.add_app("App Title", app_function)
. - 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
- Hydralit Version: 1.0.14
- Streamlit Version: [1.34.0]
- Python Version: [3.9.18]
- Operating System: [Windows11 22H2 ]
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]
this isn't an error, this is you not reading the documentation, add_app is a decorator
and the add_app you are using requires a class instance derived from HydraHeadApp
and the add_app you are using requires a class instance derived from HydraHeadApp
I had misunderstood.
Thank you for the explanatio