Open jitendriyag2 opened 5 days ago
Hello @jitendriyag2! I'm here to help you with any bugs, questions, or contributions you have. Let's squash those bugs together! 🤖
Ensure that the host
parameter in your PostgreSQLConnector configuration is correctly set to "localhost" without any extraneous characters. Here is an example configuration:
from pandasai.connectors import PostgreSQLConnector
postgres_connector = PostgreSQLConnector(
config={
"host": "localhost",
"port": 5432,
"database": "mydb",
"username": "root",
"password": "root",
"table": "payments",
}
)
Double-check for any hidden characters or typos in the host
field. If the issue persists, verify your PostgreSQL server configuration and network settings to ensure that "localhost" is correctly resolved. Additionally, make sure the dialect
is set to "postgresql" and the driver
is set to "psycopg2" in your configuration [1][2].
To continue talking to Dosu, mention @dosu.
System Info
While i am trying to connect to any of the remote db it is working as expected where are if i am trying to connect to localhost it is throwing below error
OperationalError: (psycopg2.OperationalError) could not translate host name "#@localhost" to address:
🐛 Describe the bug
While i am trying to connect to any of the remote db it is working as expected where are if i am trying to connect to localhost it is throwing below error
OperationalError: (psycopg2.OperationalError) could not translate host name "#@localhost" to address: