Skip to content

ModuleNotFoundError: No module named 'google.adk.errors.already_exists_error' #3329

@marcopellegrino-devoteam

Description

In my application I try to import AlreadyExistsError with:

from google.adk.errors.already_exists_error import AlreadyExistsError

But I get: ModuleNotFoundError: No module named 'google.adk.errors.already_exists_error'

Because I want to do:

try:
    session = await session_service.create_session(
        app_name=app_settings.APP_NAME,
        user_id=user_id,
        session_id=session_id,
    )
    logger.info("New session created: %s", session.id)
except AlreadyExistsError as e:
    raise HTTPException(
        status_code=409, detail=f"Session already exists: {session_id}"
    ) from e

I'm using google-adk 1.16.0

Metadata

Metadata

Assignees

Labels

services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions