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.FDB is in the folder with the script? If yes, then try: con = fdb.connect(dsn='db.FDB', user='sysdba', password='pass') - gil9red
  • Yes, it is. I tried this option, anyway the error - Milkiweed Gtlt
  • Is the database file exactly at the root of the volume? Which, by the way, maybe it makes sense to point out clearly ... - Akina
  • indicated the exact path, the same result - Milkiweed Gtlt
  • specify the full path to the file without localhost and if it does not work out - provide an error message ... - MaxU

0