Skip to content

ValueError: preexec_fn is not supported on Windows platforms #9

@nadendlatharak

Description

@nadendlatharak

Hi,

I tried running it on my windows machine and i was facing this issue. does this only work in linux ?

AttributeError: module 'os' has no attribute 'setsid'. Did you mean: 'getpid'?
(os-computer-use-py3.12) PS C:\Users\Nadendla Tharak\open-computer-use> poetry run start
Loaded as API: https://maxiw-os-atlas.hf.space ✔
Using AnthropicProvider with claude-3-5-sonnet-20241022
Using AnthropicProvider with claude-3-5-sonnet-20241022
Starting the display server...
(The display client will start in five seconds.)
Stopping the display client...
Stopping the sandbox...
Saving the stream as mp4...
'ffmpeg' is not recognized as an internal or external command,
operable program or batch file.
Failed to save the stream as ./output/run_2/output.mp4.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Nadendla Tharak\open-computer-use\main.py", line 91, in main
    loop.run_until_complete(start(user_input=args.prompt, output_dir=output_dir))
  File "C:\Users\Nadendla Tharak\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\Nadendla Tharak\open-computer-use\main.py", line 31, in start
    await client.start_display_client(stream_url, user_input or "Sandbox", delay=5)
  File "C:\Users\Nadendla Tharak\open-computer-use\os_computer_use\streaming.py", line 32, in start_display_client
    self.process = await asyncio.create_subprocess_shell(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nadendla Tharak\AppData\Local\Programs\Python\Python312\Lib\asyncio\subprocess.py", line 211, in create_subprocess_shell
    transport, protocol = await loop.subprocess_shell(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nadendla Tharak\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1711, in subprocess_shell
    transport = await self._make_subprocess_transport(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nadendla Tharak\AppData\Local\Programs\Python\Python312\Lib\asyncio\windows_events.py", line 400, in _make_subprocess_transport
    transp = _WindowsSubprocessTransport(self, protocol, args, shell,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nadendla Tharak\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_subprocess.py", line 36, in __init__
    self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
  File "C:\Users\Nadendla Tharak\AppData\Local\Programs\Python\Python312\Lib\asyncio\windows_events.py", line 878, in _start
    self._proc = windows_utils.Popen(
                 ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nadendla Tharak\AppData\Local\Programs\Python\Python312\Lib\asyncio\windows_utils.py", line 153, in __init__
    super().__init__(args, stdin=stdin_rfd, stdout=stdout_wfd,
  File "C:\Users\Nadendla Tharak\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 844, in __init__
    raise ValueError("preexec_fn is not supported on Windows "
ValueError: preexec_fn is not supported on Windows platforms

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions