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]: Non-docker headless mode fails with "AttributeError: 'LogStreamer' object has no attribute 'stdout_thread' #6186

Closed
1 task done
scosenza opened this issue Jan 10, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@scosenza
Copy link

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

steve_cosenza@Steves-MacBook-Pro OpenHands % git checkout 0.19.0
HEAD is now at 3733c646 Fix file uploads (#6126)
steve_cosenza@Steves-MacBook-Pro OpenHands % make build
Building project...
Checking dependencies...
Checking system...
macOS detected.
Checking Python installation...
Python 3.12.8 is already installed.
Checking npm installation...
npm 10.9.2 is already installed.
Checking Node.js installation...
Node.js 23.6.0 is already installed.
Checking Docker installation...
Docker version 27.4.0, build bde2b89 is already installed.
Checking Poetry installation...
Poetry (version 2.0.0) is already installed.
Dependencies checked successfully.
Installing Python dependencies...
Defaulting TZ (timezone) to UTC
Using virtualenv: /Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12
Installing chroma-hnswlib...
Requirement already satisfied: chroma-hnswlib in /Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12/lib/python3.12/site-packages (0.7.6)
Requirement already satisfied: numpy in /Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12/lib/python3.12/site-packages (from chroma-hnswlib) (2.2.1)
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: openhands-ai (0.18.0a0)
Setup already done. Skipping playwright installation.
Python dependencies installed successfully.
Setting up frontend environment...
Detect Node.js version...
Current Node.js version is 23.6.0, corepack is supported.
Installing frontend dependencies with npm...
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @tanstack/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn   react@"^19.0.0" from the root project
npm warn   167 more (@monaco-editor/react, @nextui-org/accordion, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected]
npm warn node_modules/@nextui-org/listbox/node_modules/@tanstack/react-virtual
npm warn   @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected]
npm warn   node_modules/@nextui-org/listbox
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/react
npm warn   peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected]
npm warn   node_modules/@nextui-org/listbox/node_modules/@tanstack/react-virtual
npm warn     @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected]
npm warn     node_modules/@nextui-org/listbox
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @tanstack/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react-dom
npm warn   react-dom@"^19.0.0" from the root project
npm warn   68 more (@monaco-editor/react, @nextui-org/accordion, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected]
npm warn node_modules/@nextui-org/listbox/node_modules/@tanstack/react-virtual
npm warn   @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected]
npm warn   node_modules/@nextui-org/listbox
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/react-dom
npm warn   peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected]
npm warn   node_modules/@nextui-org/listbox/node_modules/@tanstack/react-virtual
npm warn     @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected]
npm warn     node_modules/@nextui-org/listbox
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @tanstack/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn   react@"^19.0.0" from the root project
npm warn   167 more (@monaco-editor/react, @nextui-org/accordion, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected]
npm warn node_modules/@nextui-org/select/node_modules/@tanstack/react-virtual
npm warn   @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected]
npm warn   node_modules/@nextui-org/select
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/react
npm warn   peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected]
npm warn   node_modules/@nextui-org/select/node_modules/@tanstack/react-virtual
npm warn     @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected]
npm warn     node_modules/@nextui-org/select
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @tanstack/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react-dom
npm warn   react-dom@"^19.0.0" from the root project
npm warn   68 more (@monaco-editor/react, @nextui-org/accordion, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected]
npm warn node_modules/@nextui-org/select/node_modules/@tanstack/react-virtual
npm warn   @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected]
npm warn   node_modules/@nextui-org/select
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/react-dom
npm warn   peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected]
npm warn   node_modules/@nextui-org/select/node_modules/@tanstack/react-virtual
npm warn     @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected]
npm warn     node_modules/@nextui-org/select

> [email protected] prepare
> cd .. && husky frontend/.husky


up to date, audited 1218 packages in 1s

339 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Frontend dependencies installed successfully.
Installing pre-commit hooks...
pre-commit installed at .git/hooks/pre-commit
Pre-commit hooks installed successfully.
Building frontend...

> [email protected] build
> npm run make-i18n && tsc && react-router build


> [email protected] make-i18n
> node scripts/make-i18n-translations.cjs

vite v5.4.11 building for production...
transforming (33) vite/preload-helper.js

Source path: /Users/steve_cosenza/workspace/OpenHands/frontend/src/index.css
Setting up new context...


Source path: /Users/steve_cosenza/workspace/OpenHands/frontend/src/tailwind.css
Setting up new context...
Finding changed files: 13.476ms
JIT TOTAL: 451.447ms


(node:24028) Warning: Label 'JIT TOTAL' already exists for console.time()
(Use `node --trace-warnings ...` to show where the warning was created)
transforming (36) src/state/chat-slice.tsReading changed files: 154.275ms
Sorting candidates: 5.764ms
Generate rules: 144.87ms
Build stylesheet: 2.904ms
Potential classes:  12634
Active contexts:  2


(node:24028) Warning: No such label 'JIT TOTAL' for console.timeEnd()
transforming (1098) node_modules/refractor/lang/wolfram.js

Source path: /Users/steve_cosenza/workspace/OpenHands/frontend/node_modules/@xterm/xterm/css/xterm.css
JIT TOTAL: 0.47ms


✓ 3487 modules transformed.
build/client/.vite/manifest.json                               14.87 kB │ gzip:   1.79 kB
build/client/assets/terminal-CFbL2ovg.css                       4.64 kB │ gzip:   1.72 kB
build/client/assets/root-CdOPN4ko.css                         239.63 kB │ gzip:  27.44 kB
build/client/assets/with-props-gi9rW2-k.js                      0.35 kB │ gzip:   0.21 kB
build/client/assets/objectWithoutPropertiesLoose-BjXSgPXB.js    0.37 kB │ gzip:   0.25 kB
build/client/assets/arrow-send-t4y5vLh0.js                      0.43 kB │ gzip:   0.31 kB
build/client/assets/agent-state-u5yf9HVO.js                     0.43 kB │ gzip:   0.28 kB
build/client/assets/root-BfevsPX7.js                            0.63 kB │ gzip:   0.39 kB
build/client/assets/oauth.github.callback-PegqCLaI.js           0.65 kB │ gzip:   0.43 kB
build/client/assets/i18nInstance-CnyO1Rew.js                    0.71 kB │ gzip:   0.44 kB
build/client/assets/route-OH2WFw7R.js                           0.86 kB │ gzip:   0.49 kB
build/client/assets/preload-helper-D7HrI6pR.js                  1.02 kB │ gzip:   0.62 kB
build/client/assets/_oh.app.browser-R84lH9uy.js                 1.12 kB │ gzip:   0.63 kB
build/client/assets/settings-Bhxk6Ri7.js                        1.55 kB │ gzip:   0.73 kB
build/client/assets/infiniteQueryBehavior-DkGWFiFL.js           1.67 kB │ gzip:   0.82 kB
build/client/assets/iconBase-qaKKhmS-.js                        2.51 kB │ gzip:   1.10 kB
build/client/assets/index-aF-KBcXl.js                           2.71 kB │ gzip:   1.25 kB
build/client/assets/react-redux-DbTEHRXA.js                     3.72 kB │ gzip:   1.71 kB
build/client/assets/store-BgbkUA_d.js                           5.54 kB │ gzip:   1.98 kB
build/client/assets/index-BEEBEO_-.js                           6.58 kB │ gzip:   2.25 kB
build/client/assets/browser-ponyfill-BLXkIlq-.js               10.27 kB │ gzip:   3.51 kB
build/client/assets/index-CNgE5Yq9.js                          11.36 kB │ gzip:   4.55 kB
build/client/assets/route-DfUKQDj3.js                          13.76 kB │ gzip:   5.13 kB
build/client/assets/highlight-C6cjnpsf.js                      13.79 kB │ gzip:   3.95 kB
build/client/assets/route-BOcdSslE.js                          14.67 kB │ gzip:   6.14 kB
build/client/assets/declaration-CMv9kiu1.js                    17.44 kB │ gzip:   4.12 kB
build/client/assets/use-config-BulKyZSk.js                     26.08 kB │ gzip:   9.49 kB
build/client/assets/feature-flags-B00t8Mh3.js                  36.25 kB │ gzip:  11.14 kB
build/client/assets/index-u9nRwUo8.js                          53.03 kB │ gzip:  18.53 kB
build/client/assets/route-B0_nDxDU.js                          57.04 kB │ gzip:  20.73 kB
build/client/assets/open-hands-DD-FCS95.js                     61.84 kB │ gzip:  22.29 kB
build/client/assets/settings-up-to-date-context-DhhCfosp.js    62.42 kB │ gzip:  18.90 kB
build/client/assets/github-logo-DvtCeojH.js                    64.43 kB │ gzip:  17.54 kB
build/client/assets/upload-image-input-Dg7si5DE.js             68.20 kB │ gzip:  30.96 kB
build/client/assets/chunk-K6AXKMTT-KyAxkPYk.js                106.45 kB │ gzip:  35.99 kB
build/client/assets/scroll-to-bottom-button-uUCmdPms.js       117.18 kB │ gzip:  36.08 kB
build/client/assets/chunk-G5TSEPD3-BULF8ZFQ.js                123.40 kB │ gzip:  40.72 kB
build/client/assets/custom-input-DphPk2nQ.js                  139.11 kB │ gzip:  44.76 kB
build/client/assets/route-Xl5r4TqP.js                         177.32 kB │ gzip:  58.86 kB
build/client/assets/auth-context-BQg4xuBj.js                  180.63 kB │ gzip:  57.16 kB
build/client/assets/entry.client-D0Isg7NQ.js                  184.09 kB │ gzip:  58.64 kB
build/client/assets/terminal-DACdeKDO.js                      294.53 kB │ gzip:  73.71 kB
build/client/assets/toast-QcVDq_OD.js                         622.27 kB │ gzip: 225.18 kB
build/client/assets/_oh.app.jupyter-CJMII3bV.js               873.04 kB │ gzip: 291.70 kB

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 4.82s
vite v5.4.11 building SSR bundle for production...
transforming (1) virtual:react-router/server-build

Source path: /Users/steve_cosenza/workspace/OpenHands/frontend/src/index.css
JIT TOTAL: 0.575ms




Source path: /Users/steve_cosenza/workspace/OpenHands/frontend/src/tailwind.css
Finding changed files: 5.617ms
Reading changed files: 0.003ms
Sorting candidates: 0.002ms
Generate rules: 0.025ms
Build stylesheet: 0.001ms
Potential classes:  1
Active contexts:  2
JIT TOTAL: 19.902ms


transforming (120) node_modules/react-syntax-highlighter/dist/esm/highlight.js

Source path: /Users/steve_cosenza/workspace/OpenHands/frontend/node_modules/@xterm/xterm/css/xterm.css
JIT TOTAL: 0.704ms


✓ 444 modules transformed.
build/server/.vite/manifest.json                 0.94 kB
build/server/assets/terminal-CFbL2ovg.css        4.64 kB
build/server/assets/server-build-CdOPN4ko.css  239.63 kB
build/server/index.js                            1.24 kB
build/server/assets/terminal-KBCrT-Yi.js         6.71 kB
build/server/assets/server-build-4qUqAVIN.js   442.95 kB

✓ 1 asset moved from React Router server build to client assets.
build/client/assets/server-build-CdOPN4ko.css

SPA Mode: index.html has been written to your build/client directory
Removing the server build in /Users/steve_cosenza/workspace/OpenHands/frontend/build/server due to ssr:false
✓ built in 1.19s
Build completed successfully.
steve_cosenza@Steves-MacBook-Pro OpenHands % poetry run python -m openhands.core.main -t "write a bash script that prints hi"


/Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12/lib/python3.12/site-packages/pydantic/_internal/_config.py:341: UserWarning: Valid config keys have changed in V2:
* 'fields' has been removed
  warnings.warn(message, UserWarning)
DEBUG:openhands:DEBUG mode enabled.
19:15:09 - openhands:DEBUG: logger.py:267 - Logging initialized
19:15:09 - openhands:DEBUG: logger.py:279 - Logging to file in: /Users/steve_cosenza/workspace/OpenHands/logs
2025-01-09 19:15 - openhands_aci:DEBUG - Logger initialized
19:15:10 - openhands:DEBUG: utils.py:145 - Attempt to load default LLM config from config toml
19:15:10 - openhands:DEBUG: stream.py:92 - No events found for session a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258
19:15:10 - openhands:DEBUG: shutdown_listener.py:37 - _register_signal_handlers
19:15:10 - openhands:DEBUG: setup.py:48 - Initializing runtime: DockerRuntime
19:15:10 - openhands:DEBUG: shutdown_listener.py:45 - _register_signal_handlers:not_main_thread
19:15:10 - openhands:DEBUG: edit.py:120 - It is not recommended to cache draft editor LLM prompts as it may incur high costs for the same prompt. Automatically setting caching_prompt=false.
19:15:10 - openhands:DEBUG: llm.py:360 - Model info: {
  "key": "provider_specific_model_info",
  "max_tokens": null,
  "max_input_tokens": null,
  "max_output_tokens": null,
  "input_cost_per_token": 0.0,
  "cache_creation_input_token_cost": null,
  "cache_read_input_token_cost": null,
  "input_cost_per_character": null,
  "input_cost_per_token_above_128k_tokens": null,
  "input_cost_per_query": null,
  "input_cost_per_second": null,
  "input_cost_per_audio_token": null,
  "output_cost_per_token": 0.0,
  "output_cost_per_audio_token": null,
  "output_cost_per_character": null,
  "output_cost_per_token_above_128k_tokens": null,
  "output_cost_per_character_above_128k_tokens": null,
  "output_cost_per_second": null,
  "output_cost_per_image": null,
  "output_vector_size": null,
  "litellm_provider": "openai",
  "mode": "chat",
  "supports_system_messages": null,
  "supports_response_schema": null,
  "supports_vision": false,
  "supports_function_calling": false,
  "supports_assistant_prefill": false,
  "supports_prompt_caching": false,
  "supports_audio_input": false,
  "supports_audio_output": false,
  "supports_pdf_input": false,
  "supports_embedding_image_input": false,
  "supports_native_streaming": null,
  "tpm": null,
  "rpm": null,
  "supported_openai_params": null
}
19:15:10 - openhands:DEBUG: llm.py:119 - LLM: model has vision enabled
19:15:10 - openhands:DEBUG: llm.py:123 - LLM: model supports function calling
19:15:10 - openhands:DEBUG: edit.py:127 - [Draft edit functionality] enabled with LLM: LLM(model=litellm_proxy/bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0, base_url=https://devaigateway.a.musta.ch)
19:15:10 - openhands:INFO: docker_runtime.py:133 - [runtime a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258] Starting runtime with image: openhands-airbnb-mac
19:15:10 - openhands:DEBUG: docker_runtime.py:176 - [runtime a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258] Preparing to start container...
19:15:10 - openhands:DEBUG: docker_runtime.py:219 - [runtime a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258] Workspace Base: /Users/steve_cosenza/airlab/repos/treehouse
19:15:10 - openhands:DEBUG: docker_runtime.py:231 - Mount dir: /Users/steve_cosenza/airlab/repos/treehouse
19:15:10 - openhands:DEBUG: docker_runtime.py:237 - [runtime a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258] Sandbox workspace: /workspace
19:15:11 - openhands:ERROR: docker_runtime.py:288 - [runtime a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258] Error: Instance openhands-runtime-a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258 FAILED to start container!

19:15:11 - openhands:INFO: docker_runtime.py:137 - [runtime a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258] Container started: openhands-runtime-a012085e-5a7d-4e86-9cbd-a7c797f1aaae-12ec71e8b17cb258. VSCode URL: None
ERROR:root:  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/core/main.py", line 217, in <module>
    asyncio.run(
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 686, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/core/main.py", line 97, in run_controller
    await runtime.connect()
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 142, in connect
    self.log_streamer = LogStreamer(self.container, self.log)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/runtime/utils/log_streamer.py", line 20, in __init__
    self.log_generator = container.logs(stream=True, follow=True)
                         ^^^^^^^^^^^^^^

ERROR:root:<class 'AttributeError'>: 'NoneType' object has no attribute 'logs'
Exception ignored in: <function LogStreamer.__del__ at 0x123410ea0>
Traceback (most recent call last):
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/runtime/utils/log_streamer.py", line 41, in __del__
AttributeError: 'LogStreamer' object has no attribute 'stdout_thread'

Possibly related to: #6037 (comment)

OpenHands Installation

Docker command in README

OpenHands Version

0.19.0

Operating System

MacOS

Logs, Errors, Screenshots, and Additional Context

No response

@scosenza scosenza added the bug Something isn't working label Jan 10, 2025
@scosenza
Copy link
Author

I also tried using 0.18.0, but make build fails with a strange error, as I already have Poetry v2 installed...

steve_cosenza@Steves-MacBook-Pro OpenHands % git checkout 0.18.0
HEAD is now at 50a0b1d9 fix llm err handling (#5958)
steve_cosenza@Steves-MacBook-Pro OpenHands % make build         
Building project...
Checking dependencies...
Checking system...
macOS detected.
Checking Python installation...
Python 3.12.8 is already installed.
Checking npm installation...
npm 10.9.2 is already installed.
Checking Node.js installation...
Node.js 23.6.0 is already installed.
Checking Docker installation...
Docker version 27.4.0, build bde2b89 is already installed.
Checking Poetry installation...
Poetry 1.8 or later is required. You can install poetry by running the following command, then adding Poetry to your PATH:
 curl -sSL https://install.python-poetry.org | python3.12 -
More detail here: https://python-poetry.org/docs/#installing-with-the-official-installer
make[2]: *** [check-poetry] Error 1
make[1]: *** [check-dependencies] Error 2
make: *** [build] Error 2
steve_cosenza@Steves-MacBook-Pro OpenHands % poetry --version   
Poetry (version 2.0.0)

@scosenza
Copy link
Author

This may be "fixed" when using "main", as I now see the likely underlying error:

19:49:47 - openhands:ERROR: docker_runtime.py:306 - [runtime 096890c7-d9b8-46db-8f1f-6c6c938b01d1-3d538e96ef548023] Error: Instance openhands-runtime-096890c7-d9b8-46db-8f1f-6c6c938b01d1-3d538e96ef548023 FAILED to start container!

19:49:47 - openhands:ERROR: docker_runtime.py:310 - [runtime 096890c7-d9b8-46db-8f1f-6c6c938b01d1-3d538e96ef548023] 404 Client Error for http+docker://localhost/v1.47/images/create?tag=latest&fromImage=openhands-airbnb-mac: Not Found ("pull access denied for openhands-airbnb-mac, repository does not exist or may require 'docker login': denied: requested access to the resource is denied")
ERROR:root:  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/core/main.py", line 217, in <module>
    asyncio.run(
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 686, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/core/main.py", line 97, in run_controller
    await runtime.connect()
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 144, in connect
    await call_sync_from_async(self._init_container)
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/utils/async_utils.py", line 18, in call_sync_from_async
    result = await coro
             ^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.8/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/utils/async_utils.py", line 17, in <lambda>
    coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
                                              ^^^^^^^^^^^^^^^^^^^
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 311, in _init_container
    raise e
  File "/Users/steve_cosenza/workspace/OpenHands/openhands/runtime/impl/docker/docker_runtime.py", line 268, in _init_container
    self.container = self.docker_client.containers.run(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12/lib/python3.12/site-packages/docker/models/containers.py", line 879, in run
    self.client.images.pull(image, platform=platform)
  File "/Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12/lib/python3.12/site-packages/docker/models/images.py", line 464, in pull
    pull_log = self.client.api.pull(
               ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12/lib/python3.12/site-packages/docker/api/image.py", line 429, in pull
    self._raise_for_status(response)
  File "/Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12/lib/python3.12/site-packages/docker/api/client.py", line 277, in _raise_for_status
    raise create_api_error_from_http_exception(e) from e
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/steve_cosenza/Library/Caches/pypoetry/virtualenvs/openhands-ai-6IRix6Tj-py3.12/lib/python3.12/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation) from e

ERROR:root:<class 'docker.errors.ImageNotFound'>: 404 Client Error for http+docker://localhost/v1.47/images/create?tag=latest&fromImage=openhands-airbnb-mac: Not Found ("pull access denied for openhands-airbnb-mac, repository does not exist or may require 'docker login': denied: requested access to the resource is denied")

Surprisingly, this same docker image works when I run the CLI via Docker...

@scosenza
Copy link
Author

scosenza commented Jan 10, 2025

I'm now trying @xingyaoww 's #5284 branch, as the flow I'm really trying to test above needs to work completely without Docker...

@scosenza
Copy link
Author

Looks like #5284 isn't ready yet, so I'll wait on that one for now.

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 10, 2025

Nevermind my previous comment (I deleted it - I had something wrong setup in config.toml).

I tried both 0.19.0 and main and they both seem to be working. At least the default setup. I'm guessing you have something in config.toml that causes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants