Skip to content

deployment script failed: python deployment/deploy.py #442

@hilliao

Description

@hilliao

The README file's deployment script failed with the following error:

python deployment/deploy.py
Traceback (most recent call last):
  File "/home/hil/git/enterprise-solutions/googlecloud/ml-invest-advisory/deployment/deploy.py", line 18, in <module>
    from rag.agent import root_agent
ModuleNotFoundError: No module named 'rag'

Fix:

python -m deployment.deploy
INFO:__main__:deploying app...
DEBUG:root:deploying agent to agent engine:
Identified the following requirements: {'pydantic': '2.11.9', 'cloudpickle': '3.1.1', 'google-cloud-aiplatform': '1.118.0'}
INFO:vertexai.agent_engines:Identified the following requirements: {'pydantic': '2.11.9', 'cloudpickle': '3.1.1', 'google-cloud-aiplatform': '1.118.0'}
The following requirements are missing: {'pydantic', 'cloudpickle'}
WARNING:vertexai.agent_engines:The following requirements are missing: {'pydantic', 'cloudpickle'}
The following requirements are incompatible: {'google-cloud-aiplatform==1.118.0 (required: ==1.108.0)'}
WARNING:vertexai.agent_engines:The following requirements are incompatible: {'google-cloud-aiplatform==1.118.0 (required: ==1.108.0)'}
The following requirements are appended: {'cloudpickle==3.1.1', 'pydantic==2.11.9'}
INFO:vertexai.agent_engines:The following requirements are appended: {'cloudpickle==3.1.1', 'pydantic==2.11.9'}
The final list of requirements: ['google-cloud-aiplatform[adk,agent-engines]==1.108.0', 'google-adk==1.10.0', 'python-dotenv', 'google-auth', 'tqdm', 'requests', 'llama-index', 'cloudpickle==3.1.1', 'pydantic==2.11.9']
INFO:vertexai.agent_engines:The final list of requirements: ['google-cloud-aiplatform[adk,agent-engines]==1.108.0', 'google-adk==1.10.0', 'python-dotenv', 'google-auth', 'tqdm', 'requests', 'llama-index', 'cloudpickle==3.1.1', 'pydantic==2.11.9']
DEBUG:google.auth._default:Checking None for explicit credentials as part of auth process...
DEBUG:google.auth._default:Checking Cloud SDK credentials as part of auth process...
DEBUG:urllib3.util.retry:Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): oauth2.googleapis.com:443
DEBUG:urllib3.connectionpool:https://oauth2.googleapis.com:443 "POST /token HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): storage.googleapis.com:443

The terminal output above is truncated. The deployment succeeded. However, there were many warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions