DPY-6005: cannot connect to database (CONNECTION_ID=qkBuaD1Uq1JopfePKo/5rA==) pythonanywhere.com ATP
Python connectivity with ATP DB is working fine on local machine using the below code
import oracledb
Define connection detailsconnection = oracledb.connect(
user="admin", # Replace with your Oracle ATP username
password="XXXX666", # Replace with your Oracle ATP password
dsn="tcps://adb.uk-london-1.oraclecloud.com:1522/gffad144248701c_mani.adb.oraclecloud.com", # DSN for Oracle ATP
#config_dir="C:\oracle\Wallet_mani.zip", # Path to your wallet directory
wallet_location="C:\oracle\Wallet_mani", # Path to your wallet
wallet_password="XXXX666" # Optional: Replace with wallet password if required
)
try:
print("Connection successful!")
with connection.cursor() as cursor:
# Example query
0