1

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

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
user1295308
  • 425
  • 7
  • 20

1 Answers1

0

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!

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23