From 1282a0757d2217905a3ed6a0ec359e74a5d75c0b Mon Sep 17 00:00:00 2001 From: Aamir <48929123+heyitsaamir@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:31:25 -0700 Subject: [PATCH] [PY] fix: Remove unpacking to list for file downloads (#1851) ## Linked issues closes: #1852 ## Details Unpacking doesn't work for array.append. Which means that for non-single files, input_files.append(*files) fails with: `on_turn_error] unhandled error: list.append() takes exactly one argument (0 given)` Here we append file-by-file #### Change details > Describe your changes, with screenshots and code snippets as appropriate **code snippets**: **screenshots**: ## Attestation Checklist - [ ] My code follows the style guidelines of this project - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity - I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing - E2E testing in Teams - New and existing unit tests pass locally with my changes ### Additional information > Feel free to add other relevant information below --- python/packages/ai/teams/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/packages/ai/teams/app.py b/python/packages/ai/teams/app.py index 499194837..ebd692fff 100644 --- a/python/packages/ai/teams/app.py +++ b/python/packages/ai/teams/app.py @@ -751,7 +751,7 @@ async def _handle_file_downloads(self, context: TurnContext, state): input_files = state.temp.input_files if state.temp.input_files else [] for file_downloader in self._options.file_downloaders: files = await file_downloader.download_files(context) - input_files.append(*files) + input_files.extend(files) state.temp.input_files = input_files async def _run_ai_chain(self, context: TurnContext, state):