Immutable solution version
[BUG] JSONKnowledgeSource Error Failed to upsert documents: Request URL is missing an 'http://' or 'https://' protocol.
Complete solution
CrewAI: Contributor Vidit-Ostwal identified a bug in crewai 0.121.0 specific to .ipynb notebooks: reporter fzozyurt confirmed 'the problem was solved when I tried it in Python' (.py files instead of the notebook). If hitting the upsert error, run as a plain Python script or upgrade past 0.121.0; also verify the embedder config uses an api_url with http(s):// for HuggingFace TEI embeddings.
The problem
Issue crewAIInc/crewAI#2746 (closed, 21 comments): ### Description Hello, I call Knowledge with JSONKnowledgeSource(filepaths=["log.json"]) in CrewAI, and I use Huggingface as Embedding, but I get an error like the one below. When I use StringKnowledgeSource instead of JSON, it does not give this error and does the operation. I think there is a problem with JSON. The error I get is: [2025-04-26 14:27:54][ERROR]: Failed to upsert documents: Request URL is missing an 'http://' or 'https://' protocol. in upsert. Code: ` jsonsource = JSONKnowledgeSource(filepaths=["log.json"]) crew = Crew( agents=[agent], tasks=[sampletask], process=Process.se
The verified fix
Contributor Vidit-Ostwal identified a bug in crewai 0.121.0 specific to .ipynb notebooks: reporter fzozyurt confirmed 'the problem was solved when I tried it in Python' (.py files instead of the notebook). If hitting the upsert error, run as a plain Python script or upgrade past 0.121.0; also verify the embedder config uses an api_url with http(s):// for HuggingFace TEI embeddings.
Evidence
In gh:crewAIInc/crewAI#2746 (https://github.com/crewAIInc/crewAI/issues/2746), someone reported: Issue crewAIInc/crewAI#2746 (closed, 21 comments): ### Description Hello, I call Knowledge with JSONKnowledgeSource(filepaths=["log.json"]) in CrewAI, and I use Huggingface as Embedding, but I get an error like the one below. When I use StringKnowledgeSource instead of JSON, it does not give this error and does the operation. I think there is a problem with JSON. The error I get is: [2025-04-26 14:27:54][ERROR]: Failed to upsert documents: Request URL is missing an 'http://' or 'https://' protocol. in upsert. Code: ` jsonsource = JSONKnowledgeSource(filepaths=["log.json"]) crew = Crew( agents=[agent], tasks=[sampletask], process=Process.se The verified resolution from the thread: Contributor Vidit-Ostwal identified a bug in crewai 0.121.0 specific to .ipynb notebooks: reporter fzozyurt confirmed 'the problem was solved when I tried it in Python' (.py files instead of the notebook). If hitting the upsert error, run as a plain Python script or upgrade past 0.121.0; also verify the embedder config uses an api_url with http(s):// for HuggingFace TEI embeddings.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Z5D8FaKJh_2d1TTi4-Hh5w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[BUG] JSONKnowledgeSource Error Failed to upsert documents: Request URL is missing an 'http://' or 'https://' protocol. <span>— Vectle</span></a>