May 5, 2025
Error while adding XLSX or CSV files (pandas)
FileNotFoundError: [Errno 2] No such file or directory:
Not just the error phrase, but it tells me that there's most likely an internal error that is blocking it to get to the imported file. I didn't find anyone anywhere talking about this issue, so to me it doesn't sound like it's a general problem in the backend but more something with me in particular.
Any ideas?
Community content may not be verified or up-to-date. Learn more.
All Replies (2)
May 5, 2025
To access and use Gemini, Google generally requires users to be 18 years or older. For work or school accounts, access may be restricted to those with a qualifying edition of Google Workspace or may require explicit approval from a Google Workspace administrator. Additionally, Google Workspace for Education admins can enable Gemini for teen students (13+) with added data protection. If you are using the Google app, you may need to grant Gemini access to your location for certain features.
See subheading
Supported file typesIf problems persist, try a different browser, clear your browser's cache and cookies, or refresh the page. Finally, consider uploading smaller files or using different file formats like PDF, as some complex formatting or large files may cause issues.
May 7, 2025
Hi Scorpions and James M.,
Thanks for your replies and for taking the time to look into this.
To clarify, I'm experiencing the FileNotFoundError (e.g., for internal paths like /data/filename.csv) when using the standard file upload feature in the Gemini Advanced web UI (Chrome). This occurs after the file successfully uploads and I ask Gemini to process it, not during any manual coding or path management on my end.
Through interactive testing with the Gemini AI model itself (around May 4-7, 2025), we've found this issue is consistent across various XLSX, CSV, and TSV files, even in new chats. It seems to be an internal problem with how Gemini's code execution environment accesses these uploaded files via direct paths.
Our interactive testing with the Gemini AI model also revealed two key points. First, the platform appears to convert uploaded XLSX files into separate CSV files (one per sheet, e.g., OriginalName.xlsx - SheetName.csv) before the AI model accesses them. Second, a reliable workaround exists: the Gemini AI model can retrieve the raw text content of these files (the platform-generated CSVs from XLSX, or original CSV/TSV content) using an internal tool it has (which it calls Workspace or similar). This raw text can then be successfully loaded into pandas using io.StringIO and the correct delimiter.
This suggests the files are present, but direct path access for pandas within Gemini's environment is currently problematic, while the alternative content-fetching method works.
Hope these more specific details from my experience are helpful to others and the Gemini team. Thanks again!
Disclaimer: This reply was drafted with the assistance of the Gemini AI model (Google) based on extensive interactive testing of the described issue by the user J-RUTZ.
Last edited May 7, 2025
May 5, 2025
Hi J-RUTZ
The "FileNotFoundError" error means the system can't find the specified XLSX or CSV file. This
usually happens due to a few reasons, including a misspelled file name,
an incorrect path, or a problem with file permissions.
Troubleshooting Steps:
- Verify the File Path: Double-check the file path in your code and make sure it's accurate and matches the file's location on your system.
- Check File Existence: Ensure the file exists at the specified path.
- Adjust Permissions: If necessary, grant the script the necessary permissions to read the file.
- Navigate to the Correct Directory (if using a relative path): Before running the script, navigate to the directory where the file is located in the terminal or command prompt.
May 7, 2025
Hi Scorpions and James M.,
Thanks for your replies and for taking the time to look into this.
To clarify, I'm experiencing the FileNotFoundError (e.g., for internal paths like /data/filename.csv) when using the standard file upload feature in the Gemini Advanced web UI (Chrome). This occurs after the file successfully uploads and I ask Gemini to process it, not during any manual coding or path management on my end.
Through interactive testing with the Gemini AI model itself (around May 4-7, 2025), we've found this issue is consistent across various XLSX, CSV, and TSV files, even in new chats. It seems to be an internal problem with how Gemini's code execution environment accesses these uploaded files via direct paths.
Our interactive testing with the Gemini AI model also revealed two key points. First, the platform appears to convert uploaded XLSX files into separate CSV files (one per sheet, e.g., OriginalName.xlsx - SheetName.csv) before the AI model accesses them. Second, a reliable workaround exists: the Gemini AI model can retrieve the raw text content of these files (the platform-generated CSVs from XLSX, or original CSV/TSV content) using an internal tool it has (which it calls Workspace or similar). This raw text can then be successfully loaded into pandas using io.StringIO and the correct delimiter.
This suggests the files are present, but direct path access for pandas within Gemini's environment is currently problematic, while the alternative content-fetching method works.
Hope these more specific details from my experience are helpful to others and the Gemini team. Thanks again!
Disclaimer: This reply was drafted with the assistance of the Gemini AI model (Google) based on extensive interactive testing of the described issue by the user J-RUTZ.
Last edited May 7, 2025