Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: LocalCommandLineCodeExecutor decode error #3453

Closed
giorgossideris opened this issue Aug 30, 2024 · 0 comments · Fixed by #3454
Closed

[Bug]: LocalCommandLineCodeExecutor decode error #3453

giorgossideris opened this issue Aug 30, 2024 · 0 comments · Fixed by #3454

Comments

@giorgossideris
Copy link
Contributor

Describe the bug

When the provided code snippet includes characters that 'charmap' codec cannot decode, an error is raised.

Steps to reproduce

Example code snippet:

import autogen
from autogen.coding import LocalCommandLineCodeExecutor

config_list = autogen.config_list_from_json(
    "OAI_CONFIG_LIST"
)


llm_config={
        "cache_seed": 41,  # seed for caching and reproducibility
        "config_list": config_list,  # a list of OpenAI API configurations
        "temperature": 0,  # temperature for sampling
    }

assistant = autogen.AssistantAgent(
    name="assistant",
    llm_config=llm_config,  # configuration for autogen's enhanced inference API which is compatible with OpenAI API
)

# create a UserProxyAgent instance named "user_proxy"
user_proxy = autogen.UserProxyAgent(
    name="user_proxy",
    human_input_mode="NEVER",
    max_consecutive_auto_reply=10,
    code_execution_config={
        "executor": LocalCommandLineCodeExecutor(work_dir="coding"),
    },
)

chat_res = user_proxy.initiate_chat(
    assistant,
    message="""Run the following code snippet: `print('Καλημέρα')`""",
)

Model Used

gpt-4o

Expected Behavior

No response

Screenshots and logs

image

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant