googleapis / googleapis/python-aiplatform

ADK creating unicode escape error

Đang mở
#6,255 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: vertex-ai
Ngôn ngữ chính
Python
Star
905
Fork
465
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

Mô tả

#### Environment details

- OS type and version:
- Python version: 3.13.7
- pip version: 25.2
- `google-cloud-aiplatform` version: 1.133.0

#### Steps to reproduce

1. adk create test-agent
2. add requirements.txt file with
google-adk
google-cloud-aiplatform[adk,agent_engines]
3. Run adk deploy agent_engine \
--project="roa-agent" \
--region="us-central1" \
--staging_bucket="gs://roa-agent" \
--display_name="Test Agent" \
test-agent
4. google cloud logs say there's a unicode escape error - which must be being created by the ADK

#### Code example

```python
from google.adk.agents.llm_agent import Agent

root_agent = Agent(
model='gemini-2.5-flash',
name='root_agent',
description='A helpful assistant for user questions.',
instruction='Answer user questions to the best of your knowledge',
)
```

#### Stack trace
```
"Traceback (most recent call last):
File "/usr/local/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/local/lib/python3.12/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.12/lib/python3.12/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
target(sockets=sockets)
File "/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.12/lib/python3.12/site-packages/uvicorn/supervisors/multiprocess.py", line 64, in target
return self.real_target(sockets)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 67, in run
return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 71, in serve
await self._serve(sockets)
File "/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.12/lib/python3.12/site-packages/uvicorn/server.py", line 78, in _serve
config.load()
File "/home/appuser/.cache/pypoetry/virtualenvs/reasoning-engine-assembly-service-MATOk_fk-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 445, in load
self.loaded_app = self.loaded_app()
^^^^^^^^^^^^^^^^^
File "/code/app/api/app.py", line 60, in create_app
raise e
File "/code/app/api/app.py", line 45, in create_app
utils.load_agent_from_python_spec()
File "/code/app/api/factory/utils.py", line 423, in load_agent_from_python_spec
agent_module = importlib.import_module(ENTRYPOINT_MODULE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 1133, in get_code
File "", line 1063, in source_to_code
File "", line 488, in _call_with_frames_removed
File "/code/test-agent_tmp20260115_093405/agent_engine_app.py", line 10
root_agent = config_agent_utils.from_config("C:\Users\\RoA_agent_parent_folder\test-agent/root_agent.yaml")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape"
timestamp: "2026-01-14T22:45:31.168138Z"
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.