Significant-Gravitas/AutoGPT · error · ValueError
Cannot delete a personal organization. Convert it first.
Error message
Cannot delete a personal organization. Convert it first.
What it means
Error "Cannot delete a personal organization. Convert it first." thrown in Significant-Gravitas/AutoGPT.
Source
Thrown at autogpt_platform/backend/backend/api/features/orgs/db.py:400
if profile_update:
await prisma.organizationprofile.update(
where={"organizationId": org_id},
data=profile_update,
)
return await get_org(org_id)
async def delete_org(org_id: str) -> None:
"""Soft-delete an organization. Cannot delete personal orgs.
Sets deletedAt instead of hard-deleting to preserve financial records.
"""
org = await prisma.organization.find_unique(where={"id": org_id})
if org is None:
raise NotFoundError(f"Organization {org_id} not found")
if org.isPersonal:
raise ValueError("Cannot delete a personal organization. Convert it first.")
if org.deletedAt is not None:
raise ValueError("Organization is already deleted")
await prisma.organization.update(
where={"id": org_id},
data={"deletedAt": datetime.now(timezone.utc)},
)
async def convert_personal_org(org_id: str, user_id: str) -> OrgResponse:
"""Convert a personal org to a team org.
Creates a new personal org for the user so they always have one.
Existing resources (agents, credits, store listings) stay in the
team org — that's the point of converting.
If new personal org creation fails, the conversion is rolled back.
"""View on GitHub (pinned to 9c8bb5550f)
Solutions
- Convert the personal organization to a team organization before deleting it.
- Keep the personal organization if you still need an account.
When it happens
Trigger: Thrown at autogpt_platform/backend/backend/api/features/orgs/db.py:400 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/a611dae8c22387f7.
Report an issue: GitHub.