# PDFKnowledgeSource APIStatusError

**URL:** https://community.crewai.com/t/pdfknowledgesource-apistatuserror/5058
**Category:** CrewAI Community Support
**Created:** [March 31, 2025, 1:37pm UTC](https://community.crewai.com/t/pdfknowledgesource-apistatuserror/5058 "2025-03-31T13:37:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![maxnaro](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@maxnaro](https://community.crewai.com/u/maxnaro)
#### Post date: [March 31, 2025, 1:37pm UTC](https://community.crewai.com/t/pdfknowledgesource-apistatuserror/5058/1 "2025-03-31T13:37:37Z")

</div>

When initializing a PDFKnowledgeSource component with CrewAI, I’m encountering a critical error that prevents document ingestion: APIStatusError. **init** () missing 2 required keyword-only arguments: ‘response’ and ‘body’. The error occurs specifically during the document “upserting” process, where PDFKnowledgeSource tries to load PDF content into Mem0 storage. The logs show [ERROR]: Failed to upsert documents: APIStatusError. **init** () missing 2 required keyword-only arguments followed by [WARNING]: Failed to init knowledge.

 ![Screenshot 2025-03-31 at 15.34.41](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/2X/e/e624d45f61abedb5ed599da4e8454d32f070a143.png)

 ![Screenshot 2025-03-31 at 15.35.12](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/2X/e/eae0840420635dd631709d123f9c87eb5b1c3689.png)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/2X/3/3b3b2b2e5119c524f0cdcb43267d2d73d94aee55.png)  
 ![Screenshot 2025-03-31 at 15.35.53](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/2X/9/99caf5e55f9b44a8882455385c68ac1358ca4d42.png)

If anyone knows how to deal with the error, I would greatly appreciate that, thank you.

(base) maxnaro@Maxims-MacBook-Pro crewai-customerzero % cd “/Users/maxnaro/Documents/itnb ag/cursor\_agents/NEW BEGINNING (07.03.2025)/my-concierge-crewai/crewai-customerzero” && cd src/crewai-customerzero && python main.py  
ERROR:crew:Error during PDFKnowledgeSource inspection: ImportError - cannot import name ‘KnowledgeStorage’ from ‘crewai.knowledge’ (/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/crewai/knowledge/ **init**.py)  
Traceback (most recent call last):  
File “/Users/maxnaro/Documents/itnb ag/cursor\_agents/NEW BEGINNING (07.03.2025)/my-concierge-crewai/crewai-customerzero/src/crewai-customerzero/crew.py”, line 58, in   
from crewai.knowledge import KnowledgeStorage  
ImportError: cannot import name ‘KnowledgeStorage’ from ‘crewai.knowledge’ (/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/crewai/knowledge/ **init**.py)

=== CustomerZero Knowledge Assistant ===  
Type ‘exit’, ‘quit’, or ‘bye’ to end the conversation.  
Type ‘save’ to save the current response to a file.  
Full session log will be saved to: /Users/maxnaro/Documents/itnb ag/cursor\_agents/NEW BEGINNING (07.03.2025)/my-concierge-crewai/crewai-customerzero/src/crewai-customerzero/output/full\_session\_20250331\_140152.txt

[2025-03-31 14:01:52][ERROR]: Failed to upsert documents: APIStatusError. **init** () missing 2 required keyword-only arguments: ‘response’ and ‘body’

[2025-03-31 14:01:52][WARNING]: Failed to init knowledge: APIStatusError. **init** () missing 2 required keyword-only arguments: ‘response’ and ‘body’  
User: exit  
Assistant: Goodbye! It was nice talking to you.

---

<div class="post-metadata">

### Author: ![niyathimariya](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/niyathimariya/32/3863_2.png) [@niyathimariya](https://community.crewai.com/u/niyathimariya)
#### Post date: [June 6, 2025, 6:59am UTC](https://community.crewai.com/t/pdfknowledgesource-apistatuserror/5058/2 "2025-06-06T06:59:58Z")

</div>

getting similar error. Any update on this ??

---

<div class="post-metadata">

### Author: ![Tony\_Wood](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tony_wood/32/1876_2.png) [@Tony\_Wood](https://community.crewai.com/u/Tony_Wood)
#### Post date: [June 8, 2025, 5:48am UTC](https://community.crewai.com/t/pdfknowledgesource-apistatuserror/5058/3 "2025-06-08T05:48:41Z")

</div>

Hi Max and welcome to the community Niya

What version of crewai are you running @maxnaro

---

<div class="post-metadata">

### Author: ![niyathimariya](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/niyathimariya/32/3863_2.png) [@niyathimariya](https://community.crewai.com/u/niyathimariya)
#### Post date: [June 10, 2025, 7:00am UTC](https://community.crewai.com/t/pdfknowledgesource-apistatuserror/5058/4 "2025-06-10T07:00:48Z")

</div>

Name: crewai  
Version: 0.121.1

Im getting  
[ERROR]: Failed to upsert documents: APIStatusError. **init** () missing 2 required keyword-only arguments: ‘response’ and ‘body’  
[WARNING]: Failed to init knowledge: APIStatusError. **init** () missing 2 required keyword-only arguments: ‘response’ and ‘body’

while trying to add knowledge\_sources to crew

> self.crew = Crew(  
> agents=[  
> …  
> ],  
> tasks=,  
> process=Process.sequential,  
> verbose=True,  
> manager\_llm=self.llm,  
> knowledge\_sources=[pdf\_knowledge],  
> embedder=embedder\_config,  
> )

> ```
> pdf_knowledge = PDFKnowledgeSource(
> file_paths=["sample.pdf"],  
> )
> 
> ```

---

<div class="post-metadata">

### Author: ![Tony\_Wood](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tony_wood/32/1876_2.png) [@Tony\_Wood](https://community.crewai.com/u/Tony_Wood)
#### Post date: [June 10, 2025, 3:33pm UTC](https://community.crewai.com/t/pdfknowledgesource-apistatuserror/5058/5 "2025-06-10T15:33:04Z")

</div>

From reading through there are a couple of areas

- worth upgrading to latest version
- check the path to the pdf\_filename
- ensure your environment is working correctly

Whenever I get stuck like this.. I use `crewai create crew test` a new crew and then add in the tool I want to use… It means you can avoid any other code etc.

Hope this helps
