storm
storm copied to clipboard
Error issued by display_article_page() in Streamlit interface
Description
When attempting to select an existing generated article from the Streamlit interface in the MyArticles page, an error is issued in the streamlit interface and also the following error appears in the terminal_
...
demo_util.display_article_page(selected_article_name=selected_article_name,
TypeError: display_article_page() got an unexpected keyword argument 'show_feedback_form'
Steps to Reproduce
- Open the STORM Streamlit interface
- Go to the "My Articles" page
- Try to select an existing generated article
Expected Behavior
The selected article should be displayed without any errors.
Actual Behavior
The application throws a TypeError, indicating that the display_article_page()
function received an unexpected keyword argument 'show_feedback_form'.
Root Cause
The my_articles_page()
function in MyArticles.py
was calling demo_util.display_article_page()
with parameters that are not defined in the function signature in demo_util.py
.
Fix
The issue has been resolved by removing the unexpected parameters show_feedback_form
and show_qa_panel
from the display_article_page()
function call in the MyArticles.py
file.
In the file ./storm/frontend/demo_light/pages_util/MyArticles.py
, the following change was made:
# Before
demo_util.display_article_page(selected_article_name=selected_article_name,
selected_article_file_path_dict=selected_article_file_path_dict,
show_title=True, show_main_article=True,
show_feedback_form=False,
show_qa_panel=False)
# After
demo_util.display_article_page(selected_article_name=selected_article_name,
selected_article_file_path_dict=selected_article_file_path_dict,
show_title=True, show_main_article=True)
Environment
- Operating System: macOS Sonoma
- Python version: 3.11
- STORM tool version: latest release