user032020
user032020

Reputation: 460

snowflake.connector.errors.OperationalError: Failed to get the response

I am having trouble establishing a connection from snowflake to python (using the python snowflake.connector).

I get a message saying - snowflake.connector.errors.OperationalError: Failed to get the response. Hanging? method: post, url: https://my_company.us-east-1.snowflakecomputing.com:443/session/v1/login-request?request_id=a3d18cc0-14b8-4ed0-aeaf-054b0b138c3d&databaseName=DEPARTMENT_SALES&schemaName=SALES_MONTHLY&warehouse=INVENTORY_SALES&request_guid=58070c2e-faf7-418b-8bf1-aa22e3dc537b

Below is the code. I ran this code on window (locally on my laptop). Can anyone offer some helps? Thanks.

import pandas as pd
import snowflake.connector

ctx = snowflake.connector.connect(
    user='firstname_lastname',
    password='xxxxx',
    #account='my_company',
    account='my_company.us-east-1',
    warehouse = 'INVENTORY_SALES',
    database='DEPARTMENT_SALES',
    schema='SALES_MONTHLY' )

Upvotes: 0

Views: 2971

Answers (1)

ormu5
ormu5

Reputation: 145

For 'account' I actually had to use the value '<org>-<account>' in configuration. This paged proved useful:

https://docs.snowflake.com/en/user-guide/admin-account-identifier.html

In short, there are two values I needed: 'org' and 'account'. There is a 'locator' identifier that is deprecated but still visible in the UI at the time of this writing.

As for snowsql CLI, I had to do the same, but in addition set region to 'us-west-2' (even though my Snowflake instance is in 'us-east-2'!) to satisfy SSL certificate checks. The CLI then successfully connected using the correct domain of '<account>.us-east-2.aws.snowflakecomputing.com'.

Snowsql version: 1.2.23

Upvotes: 2

Related Questions