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

e2b template error #17

Open
yusf1013 opened this issue Feb 27, 2025 · 0 comments
Open

e2b template error #17

yusf1013 opened this issue Feb 27, 2025 · 0 comments

Comments

@yusf1013
Copy link

From today, it seems the template "desktop-dev-v2" is no longer valid:

Loaded as API: https://maxiw-os-atlas.hf.space ✔
Using OpenAIProvider with gpt-4o
Using OpenAIProvider with gpt-4o
Response 504
Stopping the VNC client...
Error stopping VNC client: cannot access local variable 'browser' where it is not associated with a value
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/yusuf/Desktop/fresh-open-computer-use/main.py", line 111, in main
    loop.run_until_complete(start(user_input=args.prompt, output_dir=output_dir))
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/yusuf/Desktop/fresh-open-computer-use/main.py", line 26, in start
    sandbox = Sandbox()
              ^^^^^^^^^
  File "/home/yusuf/Desktop/fresh-open-computer-use/os_computer_use/sandbox.py", line 133, in __init__
    super().__init__(
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b/sandbox_sync/main.py", line 137, in __init__
    self._sandbox_id = SandboxApi._create_sandbox(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b/sandbox_sync/sandbox_api.py", line 174, in _create_sandbox
    raise handle_api_exception(res)
e2b.exceptions.SandboxException: 504: b'upstream request timeout'
(os-computer-use-py3.11) yusuf@potato:~/Desktop/fresh-open-computer-use$ poetry run start
Loaded as API: https://maxiw-os-atlas.hf.space ✔
Using OpenAIProvider with gpt-4o
Using OpenAIProvider with gpt-4o
Response 404
Stopping the VNC client...
Error stopping VNC client: cannot access local variable 'browser' where it is not associated with a value
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/yusuf/Desktop/fresh-open-computer-use/main.py", line 111, in main
    loop.run_until_complete(start(user_input=args.prompt, output_dir=output_dir))
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/yusuf/Desktop/fresh-open-computer-use/main.py", line 25, in start
    sandbox = Sandbox(template="desktop-dev-v2")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yusuf/Desktop/fresh-open-computer-use/os_computer_use/sandbox.py", line 133, in __init__
    super().__init__(
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b/sandbox_sync/main.py", line 137, in __init__
    self._sandbox_id = SandboxApi._create_sandbox(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b/sandbox_sync/sandbox_api.py", line 174, in _create_sandbox
    raise handle_api_exception(res)
e2b.exceptions.SandboxException: 404: template 'desktop-dev-v2' not found

I tried changing Sandbox(template="desktop-dev-v2") to Sandbox() to use default params, but then I get this error:

Loaded as API: https://maxiw-os-atlas.hf.space ✔
Using OpenAIProvider with gpt-4o
Using OpenAIProvider with gpt-4o
Temp dir /tmp/tmp9c8bnop5
Out dir is ./output/run_46
Temp dir updated to ./output/run_46
The agent will use the following actions:
- stop()
- run_command(command)
- run_background_command(command)
- send_key(name)
- type_text(text)
- click(query)
- double_click(query)
- right_click(query)
Starting:
Starting the VNC server...
Stopping the sandbox...
Response 404
Stopping the VNC client...
Error stopping VNC client: cannot access local variable 'browser' where it is not associated with a value
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/yusuf/Desktop/fresh-open-computer-use/main.py", line 111, in main
    loop.run_until_complete(start(user_input=args.prompt, output_dir=output_dir))
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/yusuf/Desktop/fresh-open-computer-use/main.py", line 40, in start
    sandbox.vnc_server.start()
  File "/home/yusuf/Desktop/fresh-open-computer-use/os_computer_use/sandbox.py", line 72, in start
    if not self._wait_for_port(self.__desktop._novnc_port):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yusuf/Desktop/fresh-open-computer-use/os_computer_use/sandbox.py", line 39, in _wait_for_port
    return self.__desktop._wait_and_verify(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yusuf/Desktop/fresh-open-computer-use/os_computer_use/sandbox.py", line 178, in _wait_and_verify
    if on_result(self.commands.run(cmd)):
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b/sandbox_sync/commands/command.py", line 200, in run
    proc = self._start(
           ^^^^^^^^^^^^
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b/sandbox_sync/commands/command.py", line 260, in _start
    raise handle_rpc_exception(e)
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b/sandbox_sync/commands/command.py", line 247, in _start
    start_event = events.__next__()
                  ^^^^^^^^^^^^^^^^^
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b_connect/client.py", line 388, in call_server_stream
    raise error_for_response(http_resp)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/e2b_connect/client.py", line 66, in error_for_response
    error = json.loads(http_resp.content)
                       ^^^^^^^^^^^^^^^^^
  File "/home/yusuf/.cache/pypoetry/virtualenvs/os-computer-use-8Pl3SOdN-py3.12/lib/python3.12/site-packages/httpcore/_models.py", line 406, in content
    raise RuntimeError(
RuntimeError: Attempted to access 'response.content' on a streaming response. Call 'response.read()' first.
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

No branches or pull requests

1 participant