microsoft / vscode-cosmosdb

Azure Databases extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-cosmosdb
MIT License
155 stars 68 forks source link

Issue with creating MongoDB database using Azure Cosmos DB #2276

Closed loyal812 closed 4 months ago

loyal812 commented 4 months ago

Problem:

I am trying to create a MongoDB database using Azure Cosmos DB in Python, but I encountered some issues and was unsuccessful in the process.

Steps Taken:

  1. Tried creating a new MongoDB database in Azure Cosmos DB using Python.
  2. Followed the documentation for setting up MongoDB on Azure Cosmos DB.
  3. Faced errors during the database creation process.
  4. Tried troubleshooting the issue based on available resources.

Error Message:

2024-04-04 22:43:09 [INFO    ] cl_cosmos_mongo_db.py:__mongo_connect - CosmosMongoDB Server Connected.
2024-04-04 22:43:09 [CRITICAL] cl_cosmos_mongo_db.py:__mongo_connect - The user_data database does not exist.
2024-04-04 22:43:09 [INFO    ] cl_cosmos_mongo_db.py:__mongo_connect - Creating user_data database.
Arguments: (OperationFailure("Invalid custom action: CreateDatabaseCustomAction specified, full error: {'ok': 0.0, 'errmsg': 'Invalid custom action: CreateDatabaseCustomAction specified', 'code': 59, 'codeName': 'CommandNotFound'}"),)

Expected Behavior:

I expected to successfully create a MongoDB database using Azure Cosmos DB in Python without any errors.

Additional Information:

JasonYeMSFT commented 4 months ago

@loyal812 This repository is for the Azure database extension in VSCode. You might want to get help at https://github.com/Azure/azure-sdk-for-python. I assume you are using the SDK in your code.