fix: add encoding="utf-8" to open() calls in agbench and magentic-one-cli#7697
Open
EvanYao826 wants to merge 3 commits into
Open
fix: add encoding="utf-8" to open() calls in agbench and magentic-one-cli#7697EvanYao826 wants to merge 3 commits into
EvanYao826 wants to merge 3 commits into
Conversation
Add a public method to retrieve the current message thread from a group chat team after or during a run. - Add and event types in for the RPC protocol. - Add RPC handler in that returns a shallow copy of the internal message thread. - Add public method on that returns a snapshot of the message thread accumulated during runs. - Track messages in on BaseGroupChat during run_stream, clear on reset. - Add 4 pytest-asyncio tests covering: after-run retrieval, not- initialized error, snapshot isolation, and no-task continuation. Closes microsoft#6085 Signed-off-by: EvanYao826 <2869018789@qq.com>
…-cli Add explicit UTF-8 encoding to text file operations to prevent UnicodeDecodeError on Windows with non-English locales (e.g., cp950 for Traditional Chinese). Files fixed: - agbench/benchmarks/HumanEval/Templates/AgentChat/scenario.py - agbench/benchmarks/HumanEval/Templates/AgentChat/custom_code_executor.py - agbench/benchmarks/GAIA/Templates/MagenticOne/scenario.py - agbench/benchmarks/GAIA/Templates/ParallelAgents/scenario.py - agbench/benchmarks/GAIA/Templates/SelectorGroupChat/scenario.py - autogen-ext/examples/mcp_session_host_example.py - autogen-ext/src/autogen_ext/code_executors/docker_jupyter/_docker_jupyter.py - magentic-one-cli/src/magentic_one_cli/_m1.py Fixes microsoft#5566
Add explicit UTF-8 encoding to text file operations to prevent UnicodeDecodeError on Windows with non-English locales (e.g., cp950 for Traditional Chinese). Files fixed: - task_centric_memory/utils/chat_completion_client_recorder.py (2 calls) - task_centric_memory/utils/page_logger.py (3 calls) - magentic-one-cli/_m1.py (1 call missed in prior commit) - agbench/src/agbench/linter/cli.py (1 call) - agbench/src/agbench/linter/coders/oai_coder.py (2 calls) - agbench/src/agbench/remove_missing_cmd.py (1 call) - agbench/src/agbench/run_cmd.py (9 calls) - agbench/src/agbench/tabulate_cmd.py (2 calls) Fixes microsoft#5566
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5566
Add explicit UTF-8 encoding to text file operations to prevent
UnicodeDecodeErroron Windows with non-English locales (e.g., cp950 for Traditional Chinese).Changes
Files fixed:
agbench/benchmarks/HumanEval/Templates/AgentChat/scenario.pyagbench/benchmarks/HumanEval/Templates/AgentChat/custom_code_executor.pyagbench/benchmarks/GAIA/Templates/MagenticOne/scenario.pyagbench/benchmarks/GAIA/Templates/ParallelAgents/scenario.pyagbench/benchmarks/GAIA/Templates/SelectorGroupChat/scenario.pyautogen-ext/examples/mcp_session_host_example.pyautogen-ext/src/autogen_ext/code_executors/docker_jupyter/_docker_jupyter.pymagentic-one-cli/src/magentic_one_cli/_m1.pyAll
open()calls for text files now includeencoding="utf-8"explicitly.