chroma-core/chroma · error · ValueError
The URL cannot be changed after the embedding function has b
Error message
The URL cannot be changed after the embedding function has been initialized.
What it means
Error "The URL cannot be changed after the embedding function has been initialized." thrown in chroma-core/chroma.
Source
Thrown at chromadb/utils/embedding_functions/huggingface_embedding_function.py:230
return ["cosine", "l2", "ip"]
@staticmethod
def build_from_config(config: Dict[str, Any]) -> "EmbeddingFunction[Documents]":
url = config.get("url")
api_key_env_var = config.get("api_key_env_var")
if url is None:
raise ValueError("URL must be provided for HuggingFaceEmbeddingServer")
return HuggingFaceEmbeddingServer(url=url, api_key_env_var=api_key_env_var)
def get_config(self) -> Dict[str, Any]:
return {"url": self.url, "api_key_env_var": self.api_key_env_var}
def validate_config_update(
self, old_config: Dict[str, Any], new_config: Dict[str, Any]
) -> None:
if "url" in new_config and new_config["url"] != self.url:
raise ValueError(
"The URL cannot be changed after the embedding function has been initialized."
)
@staticmethod
def validate_config(config: Dict[str, Any]) -> None:
"""
Validate the configuration using the JSON schema.
Args:
config: Configuration to validate
Raises:
ValidationError: If the configuration does not match the schema
"""
validate_config_schema(config, "huggingface_server")
View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at chromadb/utils/embedding_functions/huggingface_embedding_function.py:230 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/3b7c4c54922ba248.
Report an issue: GitHub.