# FileReadTool is throwing an error that it can't read the uploaded file

**URL:** <https://community.crewai.com/t/filereadtool-is-throwing-an-error-that-it-cant-read-the-uploaded-file/1925>\
**Category:** CrewAI Community Support\
**Tags:** crewai\
**Created:** [December 10, 2024, 6:50am UTC](https://community.crewai.com/t/filereadtool-is-throwing-an-error-that-it-cant-read-the-uploaded-file/1925 "2024-12-10T06:50:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maythunguyen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/maythunguyen/32/996_2.png) [@Maythunguyen](https://community.crewai.com/u/Maythunguyen)\
**Post date:** [December 10, 2024, 6:50am UTC](https://community.crewai.com/t/filereadtool-is-throwing-an-error-that-it-cant-read-the-uploaded-file/1925/1 "2024-12-10T06:50:48Z")

</div>

Hi everybody,

I’m using the `data_extract_agent` to extract plain text from data input and uploaded files, including PDFs. However, it shows an error indicating it can’t read the uploaded file. I’m wondering if the `FileReadTool` supports PDF, DOCX, and PNG file types?

---

<div class="post-metadata">

**Author:** ![rokbenko](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/rokbenko/32/492_2.png) [@rokbenko](https://community.crewai.com/u/rokbenko)\
**Post date:** [December 10, 2024, 8:42am UTC](https://community.crewai.com/t/filereadtool-is-throwing-an-error-that-it-cant-read-the-uploaded-file/1925/2 "2024-12-10T08:42:47Z")

</div>

@Maythunguyen `FileReadTool` can read only text-based file formats while you also have PNG. Try to remove all PNGs from your project and see if the error persists. See the [docs](https://docs.crewai.com/tools/filereadtool#description):

> The `FileReadTool` conceptually represents a suite of functionalities within the crewai\_tools package aimed at facilitating file reading and content retrieval. This suite includes tools for processing batch text files, reading runtime configuration files, and importing data for analytics. **It supports a variety of text-based file formats such as `.txt`, `.csv`, `.json`, and more.** Depending on the file type, the suite offers specialized functionality, such as converting JSON content into a Python dictionary for ease of use.

---

<div class="post-metadata">

**Author:** ![Maythunguyen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/maythunguyen/32/996_2.png) [@Maythunguyen](https://community.crewai.com/u/Maythunguyen)\
**Post date:** [December 11, 2024, 10:18am UTC](https://community.crewai.com/t/filereadtool-is-throwing-an-error-that-it-cant-read-the-uploaded-file/1925/3 "2024-12-11T10:18:12Z")

</div>

Thanks, @rokbenko. What if I want the agent to read the PDF file? Is there any proper way to do that?

---

<div class="post-metadata">

**Author:** ![rokbenko](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/rokbenko/32/492_2.png) [@rokbenko](https://community.crewai.com/u/rokbenko)\
**Post date:** [December 11, 2024, 10:51am UTC](https://community.crewai.com/t/filereadtool-is-throwing-an-error-that-it-cant-read-the-uploaded-file/1925/4 "2024-12-11T10:51:37Z")

</div>

> [@Maythunguyen](#):
>
> What if I want the agent to read the PDF file?

CrewAI offers a lot of RAG tools for specific file formats:

- [PDF RAG Search](https://docs.crewai.com/tools/pdfsearchtool)
- [DOCX RAG Search](https://docs.crewai.com/tools/docxsearchtool)
- [TXT RAG Search](https://docs.crewai.com/tools/txtsearchtool)
- [CSV RAG Search](https://docs.crewai.com/tools/csvsearchtool)
- [JSON RAG Search](https://docs.crewai.com/tools/jsonsearchtool)
- [XML RAG Search](https://docs.crewai.com/tools/xmlsearchtool)
- [MDX RAG Search](https://docs.crewai.com/tools/mdxsearchtool)
- [MySQL RAG Search](https://docs.crewai.com/tools/mysqltool)
- [PG RAG Search](https://docs.crewai.com/tools/pgsearchtool)

Simply provide all the RAG tools you need to the agent as follows:

```
from crewai import Agent
from crewai_tools import (
    PDFSearchTool,
    DOCXSearchTool,
    TXTSearchTool,
)

my_agent = Agent(
    ...,
    tools=[
        PDFSearchTool(),
        DOCXSearchTool(),
        TXTSearchTool(),
    ],
)

```
