You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A properly-encoded password containing # fails at client creation. SQLAlchemy decodes the password and returns the url to clickhouse-sqlalchemy, which in turn uses the from_url method of clickhouse-driver to create a Client using the raw url. urllib.parse which is used by clickhouse-driver to create the client incorrectly splits the url at the position of #
To Reproduce
(the code fails before it attempts to connect to an actual server; the below actually runs)
fromurllibimportparsefromsqlalchemyimportcreate_engineengine=create_engine(f"clickhouse+native://user:{parse.quote_plus('pass#word')}@server/database")
engine.execute("SELECT FOO FROM BAR")
ValueError: Port could not be cast to integer value as 'pass'
Expected behavior
A successful clickhouse client creation
Versions
clickhouse-sqlalchemy 0.2.1
python 3.10
The text was updated successfully, but these errors were encountered:
Describe the bug
A properly-encoded password containing
#
fails at client creation. SQLAlchemy decodes the password and returns the url toclickhouse-sqlalchemy
, which in turn uses thefrom_url
method ofclickhouse-driver
to create a Client using the raw url.urllib.parse
which is used byclickhouse-driver
to create the client incorrectly splits the url at the position of#
To Reproduce
(the code fails before it attempts to connect to an actual server; the below actually runs)
ValueError: Port could not be cast to integer value as 'pass'
Expected behavior
A successful clickhouse client creation
Versions
The text was updated successfully, but these errors were encountered: