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

[Bug] Cannot upsert second column of questions with current behavior of load.ts #9

Open
2 tasks done
zeke-emerson opened this issue Nov 17, 2023 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@zeke-emerson
Copy link

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When I run npm start -- load --csvPath=test.csv --column=question2, I get the following error:

PineconeUnmappedHttpError: An unexpected error occured while calling the https://controller.us-east4-gcp.pinecone.io/databases endpoint.  index semantic-search already exists Status: 409.

After discussion with Roie, there should be a simple fix in load.ts that can properly check for the existence of the index and properly connect to the existing index to allow for the upload of the second column.

Expected Behavior

The npm start -- load --csvPath=test.csv --column=question2 command in the ReadMe executes without issue and the second column of questions is uploaded.

Steps To Reproduce

  1. Clone the repository and execute npm run build.
  2. Run npm start -- load --csvPath=test.csv --column=question1
  3. Run npm start -- load --csvPath=test.csv --column=question2 and observe the error noted above.

Relevant log output

No response

Environment

- **OS**:
- **Language version**:
- **Pinecone client version**:

Additional Context

No response

@zeke-emerson zeke-emerson added the bug Something isn't working label Nov 17, 2023
@zeke-emerson
Copy link
Author

On line 45 of load.ts, I changed the code to the following and it executes as expected:

  const indexList = await pinecone.listIndexes();
  if (!indexList.find((index) => index.name === indexName)) {
    await pinecone.createIndex({
      name: indexName,
      dimension: 384,
      waitUntilReady: true,
    });
  }

junefish added a commit to junefish/pinecone-semantic-search-example that referenced this issue Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant