for this code I am getting error TypeError: main.handlerepourl() argument after * must…
- User
for this code I am getting error TypeError: main.handle_repo_url() argument after * must be an iterable, not AppManager.KeyError make the neccessary changes
codedef handle_repo_url(data: AppManager) -> AppManager: repo_url = st.session_state.repo_url if not repo_url: return data if repo_url != data.repo_url: repo_path = f"cloned_repos/{repo_url.split('/')[-1]}" data.update_and_reset(repo_url=repo_url) data.update(repo_path=repo_path) st.session_state.file_path = None st.session_state.method_name = None else: repo_path = data.repo_path if os.path.isdir(repo_path): data.repo_cloned = True return data def main(): try: st.set_page_config( page_title="Test Automation Assistant", page_icon="assets/carelon_icon.png", layout="wide", ) st.logo("assets/carelon_logo.jpg") stc.markdown( "Test Automation Assistant", font_size="45px", font_weight="bold", font_color="#4d09ad", ) if "app" not in st.session_state: st.session_state.app = AppManager() inputs_col, scenarios_col = st.columns(2, gap="large", vertical_alignment="top") with inputs_col: repo_url_col, lanuage_col = st.columns([0.7, 0.3], gap="small") repo_url = repo_url_col.text_input( "Enter BitBucket repo link here:", value=st.session_state.app.repo_url, key="repo_url", on_change=handle_repo_url, args=(st.session_state.app), ) - Assistant
The error message you're encountering, , indicates that the way you are passing the arguments to the function is incorrect.