Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

google-adk[db] is missing greenlet

Đang mở Phù hợp với người mới
#7,341 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 5 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, sqlalchemy
Lĩnh vực
databases

Hướng nghiên cứu

Tái hiện lỗi bằng cách cài đặt google-adk[db] với SQLAlchemy 2.1 và khởi tạo DatabaseSessionService. Kiểm tra metadata về các dependency của package và database_session_service.py xung quanh lệnh gọi create_async_engine. Hoàn tất khi extra db cài đặt dependency bất đồng bộ cần thiết và DatabaseSessionService được khởi tạo mà không gặp NameError đã báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

🔴 Required Information

Describe the Bug:
With the recent new release of sqlalchemy (v2.1), sqlalchemy does no longer install the greenlet dependency by default. Consequently, with only google-adk[db] and an install after the release of sqlalchemy in v2.1, the db-related async functionality is missing and instantiating DatabaseSessionService results in NameError: name 'create_async_engine' is not defined.

Steps to Reproduce:

  1. Install 'google-adk[db]' (tested with v2.10.0); this needs to install sqlalchemy>=2.1
  2. Instantiate a DatabaseSessionService
  3. Observe the error
db_engine = create_async_engine(db_url, **engine_kwargs)
                      ^^^^^^^^^^^^^^^^^^^
E         NameError: name 'create_async_engine' is not defined

.venv/lib/python3.13/site-packages/google/adk/sessions/database_session_service.py:393: NameError

Expected Behavior:
Instantiating DatabaseSessionService should pass normally.

Observed Behavior:
A NameError occurs due to the missing greenlet dependency.

Environment Details:

  • ADK Library Version (pip show google-adk): 2.10.0 (but earlier version should be affected alike)
  • Desktop OS:** Ubuntu 24.04 on WSL under Windows 11
  • Python Version (python -V): 3.13.13

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-3.7-flash

🟡 Optional Information

Regression:
This worked fine with ~v2.0 of sqlalchemy.

Additional Context:
Additionally installing greenlet (resp. sqlalchemy[asyncio]) solves the issue, but since ADK relies on async session so heavily, google-adk[db] really just should install sqlalchemy with the asyncio extra.

Ngôn ngữ chính
Python
Star
21.6k
Fork
4k
Merge trung bình
12 giờ 6 phút
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/adk-python

Tất cả issue của google/adk-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.