Open surpatean opened 2 months ago
hi - thank you for raising this issue with us and providing the details! we'll take a look
hello and thank for reporting this issue ! to me, it looks like twofold:
(a bug) permission checking on Windows for the connections.toml seems to be a bit broken. Tracking issue: https://github.com/snowflakedb/snowflake-connector-python/issues/1978 edit: there seems to be some quite useful comments on how to mitigate this bug and the output until it's fixed in the PythonConnector
(an enhancement) if no default connection, nor explicitly pointed connection references this config file during connection, then we shouldn't read it at all
The second we can track on this issue, and I'll keep it updated if there's any progress with it.
Silly of me to not notice that other bug report... I agree with your bug/enhancement split @sfc-gh-dszmolka
My concern is indeed more about not checking the file if not used in the connection. Thank you.
Python version
Python 3.9.18 (main, Sep 11 2023, 14:09:26) [MSC v.1916 64 bit (AMD64)]
Operating system and processor architecture
Windows-10-10.0.19045-SP0
Installed packages
What did you do?
I create a connection:
connection_name=
parameter value,connections.toml
having a[default]
connection either.A user warning is thrown
lib\site-packages\snowflake\connector\config_manager.py:351: UserWarning: Bad owner or permissions on ~\.snowflake\connections.toml
My system does have a
connections.toml
file (used by the Snowflake VSCode extension)but no default connection, and this connection is not requested in
connection_name=
.What did you expect to see?
If no TOML connection_name is provided, and connection details are provided in-line instead of via a TOML (default) connection, then the connector should not complain about the CHMOD of this file.
Can you set logging to DEBUG and collect the logs?