OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: Resolver fails at the "Create draft PR or push branch" step due to ERROR:root:<class 'AttributeError'>: 'NoneType' object has no attribute 'new_path'

Open oconnorjoseph opened this issue 1 month ago • 2 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Describe the bug and reproduction steps

The resolver fails at the "Create draft PR or push branch" step due to the following error:

Run if [ "true" == "true" ]; then
  
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/pydantic/_internal/_config.py:345: UserWarning: Valid config keys have changed in V2:
* 'fields' has been removed
  warnings.warn(message, UserWarning)
ERROR:root:  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/openhands/resolver/send_pull_request.py", line 766, in <module>
    main()
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/openhands/resolver/send_pull_request.py", line 750, in main
    process_single_issue(
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/openhands/resolver/send_pull_request.py", line 574, in process_single_issue
    apply_patch(patched_repo_dir, resolver_output.git_patch)
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/openhands/resolver/send_pull_request.py", line 31, in apply_patch
    if not diff.header.new_path:
           ^^^^^^^^^^^^^^^^^^^^
ERROR:root:<class 'AttributeError'>: 'NoneType' object has no attribute 'new_path'
Copied repository to output/patches/issue_23[46](https://github.com/BluMintInc/agora/actions/runs/12803103609/job/35695257214#step:13:47)

OpenHands Installation

Development workflow

OpenHands Version

0.20.0

Operating System

Linux

Logs, Errors, Screenshots, and Additional Context

Attached is the full log archive from the GitHub Action job run: logs_33125511528.zip

oconnorjoseph avatar Jan 16 '25 06:01 oconnorjoseph