mem0ai/mem0 · error · ValueError

org_id and project_id must be set to access instructions or

Error message

org_id and project_id must be set to access instructions or categories

What it means

Error "org_id and project_id must be set to access instructions or categories" thrown in mem0ai/mem0.

Source

Thrown at mem0/client/main.py:710

        Returns:
            Dictionary containing the requested fields.

        Raises:
            ValidationError: If the input data is invalid.
            AuthenticationError: If authentication fails.
            RateLimitError: If rate limits are exceeded.
            MemoryQuotaExceededError: If memory quota is exceeded.
            NetworkError: If network connectivity issues occur.
            MemoryNotFoundError: If the memory doesn't exist (for updates/deletes).
            ValueError: If org_id or project_id are not set.
        """
        logger.warning(
            "get_project() method is going to be deprecated in version v1.0 "
            "of the package. Please use the client.project.get() method "
            "instead."
        )
        if not (self.org_id and self.project_id):
            raise ValueError("org_id and project_id must be set to access instructions or categories")

        params = self._prepare_params({"fields": fields})
        response = self.client.get(
            f"/api/v1/orgs/organizations/{self.org_id}/projects/{self.project_id}/",
            params=params,
        )
        response.raise_for_status()
        capture_client_event(
            "client.get_project_details",
            self,
            {"fields": fields, "sync_type": "sync"},
        )
        return response.json()

    @api_error_handler
    def update_project(
        self,
        options: Optional[ProjectUpdateOptions] = None,

View on GitHub (pinned to 001c235229)

Solutions

  1. Initialize MemoryClient with org_id and project_id before accessing instructions or categories.

When it happens

Trigger: Thrown at mem0/client/main.py:710 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15). Data as JSON: /api/errors/638834fdf0a434eb. Report an issue: GitHub.