storm icon indicating copy to clipboard operation
storm copied to clipboard

Error issued by display_article_page() in Streamlit interface

Open ibagur opened this issue 7 months ago • 2 comments

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

  1. Open the STORM Streamlit interface
  2. Go to the "My Articles" page
  3. 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

ibagur avatar Jul 18 '24 21:07 ibagur