Skip to content
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

SNOW-1616604: default config location does not work on Windows #2018

Closed
sfc-gh-pczajka opened this issue Aug 7, 2024 · 0 comments · Fixed by #2017
Closed

SNOW-1616604: default config location does not work on Windows #2018

sfc-gh-pczajka opened this issue Aug 7, 2024 · 0 comments · Fixed by #2017

Comments

@sfc-gh-pczajka
Copy link
Contributor

Python version

Python 3.12.5 (tags/v3.12.5:ff3bc82, Aug 6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)]

Operating system and processor architecture

Windows-11-10.0.22631-SP0

Installed packages

N/A

What did you do?

In [3]: os.path.expanduser("~/.snowflake")
Out[3]: 'C:\\Users\\PatrykCzajka/.snowflake'

# https://github.com/snowflakedb/snowflake-connector-python/blob/706bc2f6ae58da25885064497c217cfedcc19020/src/snowflake/connector/sf_dirs.py#L35

What did you expect to see?

C:\\Users\\PatrykCzajka\\.snowflake, as pathlib.Path.expanduser does

Quickfix: #2017

Can you set logging to DEBUG and collect the logs?

import logging
import os

for logger_name in ('snowflake.connector',):
    logger = logging.getLogger(logger_name)
    logger.setLevel(logging.DEBUG)
    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)
    ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s'))
    logger.addHandler(ch)
@github-actions github-actions bot changed the title default config location does not work on Windows SNOW-1616604: default config location does not work on Windows Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant