adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

adk deploy cloud_run fixes the Python version at 3.11, but some sample agents depend on Python 3.12.

Open mstyer-google opened this issue 1 year ago • 1 comments

Describe the bug The data science agent from adk-samples depends on Python 3.12, but adk deploy cloud_run uses a hard-coded container template that uses Python 3.11. This leads to errors when the user runs the data science agent in a Cloud Run deployment. The specific error generated is a syntax error that results from changes in f-string parsing between 3.11 and 3.12.

To Reproduce Steps to reproduce the behavior:

  1. Install current versions of adk-python and adk-samples.
  2. Run adk deploy cloud_run for the data-science agent.
  3. Navigate to the web interface for the deployed agent.
  4. Type anything in the web interface.
  5. Get an error: SyntaxError: unterminated string literal (detected at line 48)

Expected behavior Data science agent responds correctly.

Sample correct interaction: User: Hello, what can you do for me? Agent: Hello! I'm a data science and data analytics multi-agent system. I can help you with:

Querying databases: I can retrieve data from the forecasting_sticker_sales.test and forecasting_sticker_sales.train tables based on your questions. Data analysis: I can perform various data science tasks and Python analysis on the data. BigQuery ML: If you specifically ask for it, I can route your request to a BigQuery ML agent for tasks like model training, evaluation, or prediction. Just let me know what you'd like to do with your data!

mstyer-google avatar Jul 28 '25 16:07 mstyer-google

A short term workaround is to search for python:3.11-slim in your adk installation, and replace it with python:3.12-slim or python:3.13-slim.

A longer term solution is allowing a user to set this in the cli. Working on that. But thought you might like the workaround earlier.

tpryan avatar Aug 12 '25 23:08 tpryan