Thank you @AnuragSharma-MSFT, we can close this post.
A simple restart of Python was able to fix this.
Regards
Luca
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Dear Support,
I have a PostgreSQL database on Azure and I connect it to via Python.
It worked well until yesterday, and starting today I have the following error message:
OperationalError: (psycopg2.OperationalError) could not translate host name "server_name.postgres.database.azure.com" to address: Temporary failure in name resolution
I have not changed anything in the configuration of the database or my Python script.
Here is what the script looks like:
import pandas as pd
from sqlalchemy import create_engine
engine = create_engine('postgresql+psycopg2://user:password@Testta _name:5432/database_name?sslmode=require')
df = pd.read_csv('my_file.csv')
df.to_sql('table_name',engine, if_exists = 'replace', index=False)
Do you know what could be the issue?
thank you!
Thank you @AnuragSharma-MSFT, we can close this post.
A simple restart of Python was able to fix this.
Regards
Luca