OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: Unable to import 'TimeoutException' from 'e2b.sandbox'

Open rapturt9 opened this issue 1 year ago • 6 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Describe the bug and reproduction steps

Using this resolver yml:


on:
  issues:
    types: [labeled]
  pull_request:
    types: [labeled]
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
  pull_request_review:
    types: [submitted]

permissions:
  contents: write
  pull-requests: write
  issues: write

jobs:
  call-openhands-resolver:
    uses: All-Hands-AI/OpenHands/.github/workflows/openhands-resolver.yml@main
    with:
      macro: ${{ vars.OPENHANDS_MACRO || '@openhands-agent' }}
      max_iterations: ${{ fromJson(vars.OPENHANDS_MAX_ITER || 150) }}
      base_container_image: ${{ vars.OPENHANDS_BASE_CONTAINER_IMAGE || '' }}
    secrets:
      PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
      PAT_USERNAME: ${{ secrets.PAT_USERNAME }}
      LLM_MODEL: ${{ secrets.LLM_MODEL }}
      LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
      LLM_BASE_URL: ${{ secrets.LLM_BASE_URL }}

Screenshot of error: CleanShot 2024-12-05 at 12 04 54@2x

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

job-logs.txt

rapturt9 avatar Dec 05 '24 17:12 rapturt9

Looks like there is a broken link in the resolver due to moved classes - openhands.impl.e2b.sandbox.exception.TimeoutException

tofarr avatar Dec 05 '24 17:12 tofarr

CC @malhotra5

mamoodi avatar Dec 05 '24 17:12 mamoodi

I believe this was resolved in #5409; perhaps it didn't make it into the latest release @mamoodi ?

malhotra5 avatar Dec 05 '24 18:12 malhotra5

Ah yep. It did not. Thank you

mamoodi avatar Dec 05 '24 18:12 mamoodi

@mamoodi, any workaround to use the latest main?

note89 avatar Dec 06 '24 12:12 note89

@malhotra5 is there a way to use the latest main for resolver?

@note89 we are hoping to do another release today so hopefully will be resolved even if you can't specify main.

mamoodi avatar Dec 06 '24 13:12 mamoodi

I tried to use fix-me-experimental label, which uses main indeed, and it didn't work: https://github.com/All-Hands-AI/OpenHands/actions/runs/12193166717/job/34014967393#step:10:46

This is a different error from the same code. One confusing detail is that e2b was updated again last night on pypi, just for fun, from 1.0.4 to 1.0.5. (lol) But that's not the reason. The reason is that our poetry.lock was still set to 0.17.1, while the resolver uses pip and its dependency resolution ended up with 1.0.5 in the run above.

Fix for the update, with pin the minimum version:

  • https://github.com/All-Hands-AI/OpenHands/pull/5433

The alternative is to force e2b to 0.17 and pin it down for the resolver, until we can test it properly, together with the resolver use case, hopefully, as well as our regular CI. Maybe we could have integration tests for the resolver? So we can see these things.

enyst avatar Dec 06 '24 15:12 enyst

The PR was merged in main. Applying fix-me-experimental now starts the resolver successfully: https://github.com/All-Hands-AI/OpenHands/actions/runs/12202046053/job/34041830904#step:10:12592

enyst avatar Dec 06 '24 16:12 enyst

This should be fixed now with the latest released version.

mamoodi avatar Dec 06 '24 19:12 mamoodi