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.
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.