cancel
Showing results for 
Search instead for 
Did you mean: 

Error while HANA Cloud tenant in Python on SAP HANA Cloud

PavanM
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi All,

I am doing the exercise in, the lesson Multi Model - AutoML Introduction which is part of "Guided Experience - Introduction to SAP HANA Cloud".

Here I am getting an error when I create a dataframe in the Jupyterlab. The command I've given as per the exercise is 

import hana_ml.dataframe as dataframe

hana_address = 'HANA_TENANT_HOST'
hana_port = 443
hana_user = 'GE86007'
hana_password = 'Ob*******'
hana_encrypt = True #for HANA Cloud

# Establish connection
conn = dataframe.ConnectionContext(address = e3bd540b-325a-4e89-8404-1e17a1a6cbb8.hna0.prod-eu10.hanacloud.ondemand.com
port = 443,
user = GE86007,
password = Obm******,
encrypt = True,
sslValidateCertificate = 'false')

When I execute the above command I get an error message that says Invalid Syntax pointing the error at the line

conn = dataframe.ConnectionContext(address = e3bd540b-325a-4e89-8404-1e17a1a6cbb8.hna0.prod-eu10.hanacloud.ondemand.com

Because of this error I am not able to proceed further in the exercise to create the data frame. 

I814150_1-1713864284407.png

Please advise how to fix this error. 

Thank you.

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Julio_B
Product and Topic Expert
Product and Topic Expert

Hi dear colleague,

You're passing values directly into the ConnectionContext constructor without quotes, which will make Python interpret them as variables. Try to put the value of address  in quotes.

Best regards,

PavanM
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks a lot Julio. That really helped. Just to let everyone else know how to put the correct address details I've put the correct screen shot here again

I814150_0-1713949254303.png

 

Answers (0)