Python stops working when try to connect to SAP HANA

567 Views Asked by At

I'm trying to connect with SAP Hana using python on Anaconda.

The SAP team has already given me the data to connect, but every time I try to run the code it simply loads for two seconds and then shows a pop up saying that "Python has stopped working", then it kills my kernel and restart it.

I can't figure out why this is happening because it doesn't show a proper error message, only crashes and that it.

I'm following the instructions from the SAP developers page and I'm on step 3 sub-topic 2 https://developers.sap.com/tutorials/hana-clients-python.html

See below my few lines of code.

from hdbcli import dbapi
conn = dbapi.connect(
    address="awsddb01ler.com",
    port=30044,
    user="MyUser",
    password="MyPassword",
    ENCRYPT=True,
    sslValidateCertificate=False)

If anyone has an idea of why this is happening or how can I can correct it, please share it!

1

There are 1 best solutions below

0
On
  1. Check that you have the correct packages in the correct versions. This is sometimes tricky with SAP. Check also https://tools.hana.ondemand.com/#hanatools

  2. As explained use trace to find the cause of the crash

  3. Check your settings. sslValidateCertificate is typcially true, if you are in a corporate environment or use Hana Cloud.