Skip to content

Seeing exitcode: 127 (execution failed) on Windows 10 for every command #111

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

Closed
skye0402 opened this issue Oct 5, 2023 · 9 comments
Closed
Labels
code-execution execute generated code

Comments

@skye0402
Copy link

skye0402 commented Oct 5, 2023

Dear experts,

I'm running Windows 10 and the example code https://github.com/microsoft/autogen/blob/main/notebook/agentchat_web_info.ipynb

If figures out that "requests" is missing so it tries to install. But 'sh' can't be found. That's strange because if I type it in the CLI it's starting. Same is the case for 'pip' (which also works). Docker image building is working it seems.

Any idea?

>>>>>>>> USING AUTO REPLY...

>>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is sh)...
user_proxy (to assistant):

exitcode: 127 (execution failed)
Code output:

sh: powershell: not found

Funny enough after all errors it shows the abstract of the paper?

assistant (to user_proxy):

Based on the abstract, the paper titled "AutoGen: An Open-source Framework for Conversational Agents in Large Language Model Applications" is about a framework that allows developers to build applications using large language models (LLMs). The framework, AutoGen, enables multiple agents to converse with each other to accomplish tasks. It is customizable, can operate in various modes, and allows developers to define agent interaction behaviors. The paper also discusses empirical studies demonstrating the effectiveness 
of the framework in various applications.

Given this, the paper should be of interest to:

1. **Researchers and Developers** in the field of artificial intelligence, specifically those working with large language models. They can gain insights into how to build applications using conversational agents.

2. **Data Scientists and Machine Learning Engineers** who are interested in building applications using large language models. They can learn about a new framework that can help them in their work.

3. **Academics and Students** studying artificial intelligence, machine learning, or related fields. The paper can provide them with a deeper understanding of the practical applications of large language models.

4. **Tech Companies** that are working on or planning to work on applications involving large language models. The paper can provide them with a new perspective on how to approach their projects.

TERMINATE
@KPLauritzen
Copy link

I have the same issue

@skye0402
Copy link
Author

skye0402 commented Oct 5, 2023

I suspect it's because Docker is linuxoid (WSL-2) and the OS Windows which confuses it. It seems to get the task done (or close to done) but requires more than double the steps.

@LittleLittleCloud
Copy link
Collaborator

Looks like autogen overwrite ‘sh’ to ‘ps1’ when OS is windows, even if the code is running inside a Linux docker

if WIN32 and lang in ["sh", "shell"]:

@skye0402
Copy link
Author

skye0402 commented Oct 6, 2023

Agree @LittleLittleCloud - looks like you found the bug!

@LittleLittleCloud
Copy link
Collaborator

LittleLittleCloud commented Oct 6, 2023

@sonichi Before I make a fixing PR, do you know the full story of overwriting sh to ps1 on windows? The overwriting doesn't making sense to me here because syntax for sh and ps1 are different. Even if powershell is available on user system, the code block won't be executed successfully either. But there may be some corner cases I haven't considered?

@sonichi
Copy link
Contributor

sonichi commented Oct 7, 2023

The reason was to support local execution on windows. But I forgot the docker part. So, please go ahead.

@mrauter1
Copy link
Contributor

mrauter1 commented Oct 7, 2023

@sonichi Before I make a fixing PR, do you know the full story of overwriting sh to ps1 on windows? The overwriting doesn't making sense to me here because syntax for sh and ps1 are different. Even if powershell is available on user system, the code block won't be executed successfully either. But there may be some corner cases I haven't considered?

Does the assistant agent know the environment and shell it is running? If not, it would be more robust to provide this information in the system message in case autogen is running in windows and without docker.

@sonichi
Copy link
Contributor

sonichi commented Oct 7, 2023

@sonichi Before I make a fixing PR, do you know the full story of overwriting sh to ps1 on windows? The overwriting doesn't making sense to me here because syntax for sh and ps1 are different. Even if powershell is available on user system, the code block won't be executed successfully either. But there may be some corner cases I haven't considered?

Does the assistant agent know the environment and shell it is running? If not, it would be more robust to provide this information in the system message in case autogen is running in windows and without docker.

The assistant agent doesn't know. So I agree with your suggestion.

@thinkall
Copy link
Collaborator

@skye0402 , We are closing this issue due to inactivity; please reopen if the problem persists.

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

No branches or pull requests

6 participants