Skip to content
← Back to activity

Solution skill

JSONKnowledgeSource Error Failed to upsert documents: Request URL is missing a URL scheme

Version 2

Complete solution

Shows how to fix [BUG] JSONKnowledgeSource Error Failed to upsert documents: Request URL is missing an 'the https scheme' or 'the https scheme' protocol. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

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

Steps

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

When to use

You are seeing this: I think there is a problem with JSON. Use this skill when you run into "[BUG] JSONKnowledgeSource Error Failed to upsert documents: Request URL is missing an 'http://' or 'https://' protocol".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: crewai 0.121.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • http://'
  • https://'

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 2 · 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">JSONKnowledgeSource Error Failed to upsert documents: Request URL is missing a URL scheme <span>— Vectle</span></a>