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
Access the database after disconnecting
I can able to execute queries on a ClickHouse database after disconnecting the client without encountering a NetworkError as expected.
To Reproduce
Modules
from clickhouse_driver import Client
from clickhouse_driver.errors import NetworkError
try:
# Execute the first query
response = client.execute("describe table_name")
print(response)
except NetworkError as e:
print(f"Error: {e}")
print("The client encountered a NetworkError.")
Disconnect the ClickHouse client
client.disconnect()
try:
# Attempt to execute a query after disconnecting (this will likely raise a NetworkError)
response = client.execute("describe table_name")
print(response)
except NetworkError as e:
print(f"Error: {e}")
print("The client encountered a NetworkError after disconnecting.")
Expected behavior
NetworkError excepted.
Versions
clickhouse-driver 0.2.6.
Python 3.9.10.
The text was updated successfully, but these errors were encountered:
Access the database after disconnecting
I can able to execute queries on a ClickHouse database after disconnecting the client without encountering a NetworkError as expected.
To Reproduce
Modules
from clickhouse_driver import Client
from clickhouse_driver.errors import NetworkError
Create a ClickHouse client
client = Client(
host=host,
port=9000,
database='ClickHouse_DB'
user='default',
password='pass',
)
try:
# Execute the first query
response = client.execute("describe table_name")
print(response)
except NetworkError as e:
print(f"Error: {e}")
print("The client encountered a NetworkError.")
Disconnect the ClickHouse client
client.disconnect()
try:
# Attempt to execute a query after disconnecting (this will likely raise a NetworkError)
response = client.execute("describe table_name")
print(response)
except NetworkError as e:
print(f"Error: {e}")
print("The client encountered a NetworkError after disconnecting.")
Expected behavior
NetworkError excepted.
Versions
The text was updated successfully, but these errors were encountered: