Skip to content

Error getting snowsql config details #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
scwin813 opened this issue Jun 7, 2023 · 0 comments
Open

Error getting snowsql config details #9

scwin813 opened this issue Jun 7, 2023 · 0 comments

Comments

@scwin813
Copy link

scwin813 commented Jun 7, 2023

When running the 02_load_raw.py file, there is an error as seen below.

`Traceback (most recent call last):
File ".\sfguide-data-engineering-with-snowpark-python\utils\snowpark_utils.py", line 74, in get_snowsql_config
session_config = config[connection_path]
File ".\miniconda3\envs\pysnowpark\lib\configparser.py", line 960, in getitem
raise KeyError(key)
KeyError: 'connections.dev'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "02_load_raw.py", line 76, in
session = snowpark_utils.get_snowpark_session()
File ".\sfguide-data-engineering-with-snowpark-python\utils\snowpark_utils.py", line 28, in get_snowpark_session
snowpark_config = get_snowsql_config()
File ".\sfguide-data-engineering-with-snowpark-python\utils\snowpark_utils.py", line 82, in get_snowsql_config
raise Exception(
Exception: Error getting snowsql config details`

This error occurs because the code looks for the variable connections.dev in my snowsql config file. In my case, this connection was not named dev but a more specific name.

[connections.snowpark_login] accountname = myaccount.west-europe.azure username = my_user password = my_password
Thus it cannot find login details in the config file. I fixed it for now by hardcoding my own naming at line 54 in the snowpark_utils.py file but there should either be a dynamic way to search for the login credentials or the quickstart should specify explicitly that you need to name the connection in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant