Skip to content

FileSurfer in Magentic-One no longer able to find or list files after 0.5.1 update. Keeps returning FileNotFoundError #6234

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

Open
zytoh0 opened this issue Apr 7, 2025 · 0 comments · May be fixed by #6275

Comments

@zytoh0
Copy link

zytoh0 commented Apr 7, 2025

What happened?

Describe the bug
After upgrading to python-v0.5.1, FileSurfer can no longer locate or read local files that exist. Attempting to access a simple test folder causes the agent to return FileNotFoundError, despite the folder being valid and files existing and accessible via Explorer or standard Python libraries.

0.4.9 works
Image

After 0.5.1 update
Image

To Reproduce
Steps to reproduce:

  1. Create a folder locally at C:\Users\User\Documents\test
  2. Place any test file inside (e.g., example.txt)
  3. Run the following Magentic-One CLI command: m1 "Ask FileSurfer to find out the contents of this folder: C:\Users\User\Documents\test"
  4. Output:
---------- FileSurfer ----------
Path: C:\Users\User\Documents\test
Title: FileNotFoundError
Viewport position: Showing page 1 of 1.
=======================
# FileNotFoundError

File not found: C:\Users\User\Documents\test

Expected behavior
List of files in the directory

Which packages was the bug in?

Python Extensions (autogen-ext)

AutoGen library version.

Python 0.5.1

Other library version.

No response

Model used

qwen2.5-coder:32b-instruct-q2_K

Model provider

Ollama

Other model provider

No response

Python version

3.11

.NET version

None

Operating system

Windows

ShyamSathish005 added a commit to ShyamSathish005/autogen that referenced this issue Apr 11, 2025
Fixes microsoft#6234

Update `test_filesurfer_agent.py` to handle valid directory paths.

* Add `test_open_path_valid_directory` test to verify that `FileSurfer` can read a valid directory without returning `FileNotFoundError`.
* Mock API calls and create a test directory for the new test case.
* Validate that the `FileSurfer` agent correctly reads the directory and returns the expected content.
@ShyamSathish005 ShyamSathish005 linked a pull request Apr 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant