snowflake.connector.errors.ProgrammingError: 250001 (08001): Failed to connect to DB
Fixes Snowflake connections rejected at the account or network level. Use when connect() raises 250001. Not for wrong passwords (those raise 250001 too, so check) or import errors.
TL;DR: The driver cannot establish the session: wrong account identifier, bad credentials, or blocked network. Use the full account identifier ([org]-[account]), verify the password, and make sure your firewall allows Snowflake.
snowflake.connector.errors.ProgrammingError: 250001 (08001): Failed to connect to DB: [account].snowflakecomputing.com:443Fix it
- Use the right account format: account='[orgname]-[accountname]' (new format) or the legacy locator with region/cloud if needed. Expected: matches what the Snowflake UI shows in your URL.
- Verify user and password by logging into the web UI with the same pair. Expected: logs in.
- Test the network: curl -sI your Snowflake account URL with a 10 second timeout. Expected: HTTP 200. A fail means firewall/proxy.
- Retry connect() with the corrected parameters. Expected: connection opens.
When this applies
- connect() raises ProgrammingError 250001.
When it doesn't
- The import itself fails: native dependency problem, different skill.
- Queries fail after connecting: warehouse/role/permission issue.
Compatibility
- snowflake-connector-python 2.x/3.x.
Why it happens
250001 is the generic "could not connect" bucket: DNS/account typos, wrong passwords, and blocked egress all land here, so check all three.
Edge cases
- SSO/OAuth users must pass authenticator='externalbrowser' or 'oauth' with a token, not a password.
- PrivateLink accounts use a different hostname; the public one will not resolve.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.