There is a .FDB file. There is a script:
import fdb con = fdb.connect(dsn='localhost:/db.FDB', user='sysdba', password='pass') cursor = con.cursor() cursor.execute(query) row = cursor.fetchall() print(row) The following error appears on startup: Traceback (most recent call last): File "connect_db.py", line 4, in <module> con = fdb.connect(dsn='localhost:/db.FDB', user='sysdba', password='pass') File "/home/paranoid/.local/lib/python3.5/site-packages/fdb/fbcore.py", line 734, in connect "Error while connecting to database:") fdb.fbcore.DatabaseError: ('Error while connecting to database:\n- SQLCODE: -902\n- Unable to complete network request to host "localhost".\n- Failed to establish a connection.', -902, 335544721)
Re-read the documentation, tried different variations of the server, nothing helps
db.FDBis in the folder with the script? If yes, then try:con = fdb.connect(dsn='db.FDB', user='sysdba', password='pass')- gil9redlocalhostand if it does not work out - provide an error message ... - MaxU