Skip to Content

How to access HDI Container of Cloud Foundry trial account in Python?

Hi Experts,

Need your guidence with below requrement:

Is it possible to access the HDI container of Cloud Foundry "trial" using Python application (example Flask)?

I can do it very easily using Node.js express

But with Python, i am getting issues.

I am trying to access like below:

hana = env.get_service(label='hanatrial')

conn = dbapi.connect(address=hana.credentials['host'], port=int(hana.credentials['port']), user=hana.credentials['user'], password=hana.credentials['password'], encrypt="true")



hdbcli.dbapi.Error: (-10709, 'Connection failed (RTE:[300010] Cannot create SSL context: SSL trust store cannot be found: /home/vcap/.ssl/trust.pem (')


Followed the documentation below, but looks like it is not for "trial".

is there any way to access HDI containers of Cloud Foundry "trial" in Python?

Many thanks in advance,

Best Regards,

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Apr 16, 2020 at 06:15 PM

    For some more background on this you can have a look as well at my recent post

    The simplest solution though would be to add `sslValidateCertificate='false',` like

    conn = dbapi.connect(
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 25, 2019 at 05:52 PM

    Have you tried the description in Connecting Python Application to SAP HANA (XSA)?

    Add a comment
    10|10000 characters needed characters exceeded

    • How to set up the connection using Node.js on Windows? I am getting the following error: The PSE file does not exist.

      {"code":-10709,"message":"Connection failed (RTE:[300010] Cannot create SSL context: Error in api.SSL_CTX_set_default_pse_by_name C:\\Program Files\\SAP\\hdbclient\\ - SSL error [4129]: Unknown error, General error: 0x00001021 | SAPCRYPTOLIB | SSL_CTX_set_default_pse_by_name\nSAPCRYPTO API error\nThe PSE file does not exist.\n0xa1d50108 | TOKEN_TOKPSE | SSL_CTX_set_default_pse_by_name\nToken application not existing\nCannot open PSE (PSE=C:\\Program Files\\SAP\\hdbclient\\, SECUDIR=C:\\Program Files\\SAP\\hdbclient, user=I068527 I068527 I068527)\n0xa1d50108 | TOKEN_TOKPSE | sec_SSL_CTX_set_asc\nToken application not existing\n (ErrCode: 4129) (","sqlState":"","status":500}
  • Posted on Jul 16, 2020 at 12:45 PM

    for resolving the mistake, I set the conecction in this mode:

    var conn_params =


    serverNode: "",

    encrypt: true,

    schema: "EDW_...",

    uid: "SYSTEM",

    pwd: "xxxxxx",

    sslValidateCertificate: "false"



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.