CosmosDB emulator not working with Flask and MongoDB - python

I am trying to learn how to use CosmosDB with Flask. I went through the tutorial on building a flask app using CosmosDB for MongoDB API(https://learn.microsoft.com/en-us/azure/cosmos-db/create-mongodb-flask#run-the-web-app). I keep getting the error:
pymongo.errors.ConnectionFailure: [WinError 10061] No connection could be made because the target machine actively refused it.
The emulator is running, but it will not connect. I followed the instructions and got it to work once before, but now it no longer works.
EDIT: I do have the Python Extension for VSCode

Did you install the Python extension? You can go through this Build a Flask app using Azure Cosmos DB for MongoDB API and verify if you have done it correcly.

Related

How to deploy a FastAPI server with mysql on vercel?

I deployed the server developed with FastAPI on vercel and it is working. Server is updated to use mysql server and is now working with local mysql. But now I have no way to deploy that on vercel. Can anyone give some tips about how to do that?

Cassandra Connection Problem in Heroku deployment

Hi I have deployed a Flask (ML Project) in Heroku cloud and the app is published. But when I try to predict the model, it gave an error of database connection. When I debug I found out that the connection to the cassandra db is not working. Here was my code
self.cloud_config = {'secure_connect_bundle': "cassandraconnection\\secure-connect-test.zip"}
self.auth_provider = PlainTextAuthProvider('XXX','XXX')
self.cluster = Cluster(cloud=self.cloud_config, auth_provider=self.auth_provider)
The secure-connect-test.zip file is located in the project directory itself. But still i am getting the error
No such file or directory: 'cassandraconnection\\secure-connect-test.zip'
Can anyone suggest where I am making the mistake. Or how to solve this issue
It's very likely that where you think the secure bundle should be and where Heroku is looking for it don't match.
We recommend that you always specify the full path to your Astra DB secure connect bundle to avoid confusion. Cheers!

Flask App deploy on GCP has an Internal Server Error

I’ve recently tested and deployed a flask app as the minusthemiddleman website. All of the functions tested and worked in the sandbox by multiple testing methods before deployment to nginx and uwsgi in production. For some reason page 2 of the search function causes a resource problem in app as deployed. I’ve had a chance to monitor the redis directly using $redis-cli monitor and check my pip list to make everything is installed in production correctly.
The specific error is:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Does anybody have ideas as to why this is malfunctioning? Thanks,

Failing to install pyodbc package in AWS ec2

I'm running a basic Amazon Linux AMI VM and trying to set a Python script to run remotely. I have most of the stuff set up, however I can't get pyodbc to install using pip or any other method I've been able to find. It might be missing a dependency or something but it just says, "Failed building wheel for pyodbc". I'm using this to connect to an RDS SQL server database. Any advice on how to get pyodbc working, or on an alternative package to use would be greatly appreciated.

openshift python mongodb local

I have a bottle+mongo application running in openshift. when I git-clone the application to my local computer neither the database nor the env-variables get download on my computer --just the python files. Should I have to mimic the mongo part in my local computer to developed locally? Or I missing something here.
Yes. You have to run your own Mongodb server locally or port forward and use the OPENSHIFT Mongodb.

Categories

Resources