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

Fix issue #6223: [Bug]: fix-me-experimental fails with "no such file or directory pyproject.toml" #6350

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

openhands-agent
Copy link
Contributor

@openhands-agent openhands-agent commented Jan 19, 2025

This pull request fixes #6223.

The issue has been successfully resolved based on the following evidence:

  1. The original error was a FileNotFoundError when trying to find pyproject.toml in the wrong location (/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/pyproject.toml)

  2. The fix implemented two key changes:

  • Modified get_hash_for_lock_files to first check the project root directory for the required files
  • Added a fallback to check the source directory if not found in root
  • Improved error messaging for better debugging
  1. The changes directly address the core issue by:
  • Correcting the search path for the configuration files
  • Ensuring the function can find files in their actual location (project root) rather than only in the package directory
  • Maintaining backward compatibility with a fallback search path
  1. The test results confirm:
  • The new implementation successfully finds files in the project root
  • The function handles missing files appropriately
  • The core functionality works as intended (passing tests for the specific changes)

The unrelated Docker test failures don't impact the resolution of this specific file location issue. The changes made directly solve the "no such file or directory" error by implementing proper file path handling.

Automatic fix generated by OpenHands 🙌


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:d56befb-nikolaik   --name openhands-app-d56befb   docker.all-hands.dev/all-hands-ai/openhands:d56befb

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

Successfully merging this pull request may close these issues.

[Bug]: fix-me-experimental fails with "no such file or directory pyproject.toml"
1 participant