Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinecone migration sample fails when using default AlloyDB Vector Store uuid column. #376

Open
paulramsey opened this issue Mar 6, 2025 · 0 comments
Assignees
Labels
api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. samples Issues that are directly related to samples.

Comments

@paulramsey
Copy link

Thanks for stopping by to let us know something could be better!

Environment details

  • OS type and version: Debian 6.1.128-1 (2025-02-07) x86_64 GNU/Linux
  • Python version: Python 3.11.2
  • pip version: pip 25.0.1
  • langchain-google-alloydb-pg version: 0.9.3

Steps to reproduce

  1. Deploy GCE VM
  2. Clone repo
  3. Replace parameters to match environment
  4. Run migrate_pinecone_vectorstore_to_alloydb.py
  5. Result: Script throws an error complaining about invalid UUID

Stack trace

File "/home/admin/langchain-google-alloydb-pg-python/samples/migrations/.venv/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 558, in _prepare_and_execute
self._handle_exception(error)
File "/home/admin/langchain-google-alloydb-pg-python/samples/migrations/.venv/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 508, in _handle_exception
self._adapt_connection._handle_exception(error)
File "/home/admin/langchain-google-alloydb-pg-python/samples/migrations/.venv/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 792, in _handle_exception
raise translated_error from error
sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.DataError'>: invalid input for query argument $1: '10004' (invalid UUID '10004': length must be between 32..36 characters, got 5)
[SQL: INSERT INTO "public"."alloydb_table"("langchain_id", "content", "embedding", "langchain_metadata")VALUES ($1, $2, $3, $4)]
[parameters: ('10004', '', '[-0.0725007653, 0.0165581517, -0.0556337945, 0.0146470582, 0.0720141605, 0.0334938131, 0.0337613411, 0.0576897934, 0.00365613075, 0.0360074714, 0.056 ... (10874 characters truncated) ... , 0.0443097912, 0.0184528288, -0.0771082789, 0.000180458766, -0.039135702, 0.00094524835, -0.0828015059, 0.0293187723, -0.0159589667, -0.00986057054]', '{"actors": "J\u00f3zef Pawlowski, Susan Lynch, Stuart Graham, Nigel O'Neill", "awardsnominatedfor": 3.0, "awardsreceived": "", "boxoffice": "", "co ... (1515 characters truncated) ... railer": "https://www.youtube.com/watch?v=rqAmglk317k", "trailersite": "YouTube", "viewrating": "Not Rated", "writer": "Brendan Mullin, Chris Baugh"}')]
(Background on this error at: https://sqlalche.me/e/20/dbapi)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fee0cd5eb90>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fee055056a0>, 2182.298839121), (<aiohttp.client_proto.ResponseHandler object at 0x7fee055055c0>, 2182.523475924)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fee0c59ac90>

@product-auto-label product-auto-label bot added api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. samples Issues that are directly related to samples. labels Mar 6, 2025
@averikitsch averikitsch self-assigned this Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. samples Issues that are directly related to samples.
Projects
None yet
Development

No branches or pull requests

3 participants