3
I made this Python code (basic connection with Firebird):
import fdb
con = fdb.connect(
host='192.168.1.17', database='/home/firebird/questor.fdb',
user='sysdba', password='masterkey'
)
cur = con.cursor()
cur.execute("select nomeusuario from usuario")
print(cur.fetchall())
and is returning this error on the console:
Traceback (most recent call last):
File "C:/Users/Thales/PycharmProjects/TesteBanco/main.py", line 5, in <module>
user='sysdba', password='masterkey'
File "C:\Users\Thales\PycharmProjects\TesteBanco\venv\lib\site-packages\fdb\fbcore.py", line 784, in connect
load_api(fb_library_name)
File "C:\Users\Thales\PycharmProjects\TesteBanco\venv\lib\site-packages\fdb\fbcore.py", line 220, in load_api
setattr(sys.modules[__name__], 'api', ibase.fbclient_API(fb_library_name))
File "C:\Users\Thales\PycharmProjects\TesteBanco\venv\lib\site-packages\fdb\ibase.py", line 1385, in __init__
raise Exception("The location of Firebird Client Library could not be determined.")
Exception: The location of Firebird Client Library could not be determined.
Points to raise here:
I already have the Firebird2.5 Classic Server installed;
I have installed the fdb package that is at the beginning of the code; and
I looked for the solution all morning before coming to create this topic!
Hello Thales, have you been able to test my answer? In case I have helped you please mark it as right. If you need help I am at your disposal. Thank you!
– Éder Garcia
In reality as you were the only one who proposed to help, and that in fact your answer is a valid answer to the problem of not finding the FDB package, I marked as right. However, in my case I was with Python3 32bits on a 64bit machine, and therefore generates the same error as if I did not have the package. Thank you anyway!
– Thales H. P. de Lira
Hello @Thales, I’m glad you managed to solve the problem. Hug and see you next!
– Éder Garcia