Ich brach bereits meinen Kopf, wo ist das Problem.Verbinden mit Firebird unter Windows mit Python
import fdb
con = fdb.connect(host='localhost',
database='//soulu.fdb',
user='sysdba',
password='masterkey',
charset='WIN1251'
)
Und ich bekomme dieses Ergebnis. Bereits alle Varianten getestet: mit charset utf8, win1251: benutze dsn, verwende separate Host- und Datenbankparameter. Führen Sie das Skript unter Ubuntu für Windows aus. Nichts hilft.
Traceback (most recent call last):
File "C:\Users\ko-ov\Documents\Albatros\db for upload\loader.py", line 8, in <module>
charset='WIN1251'
File "C:\Users\ko-ov\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fdb\fbcore.py", line 734, in connect
"Error while connecting to database:")
File "C:\Users\ko-ov\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fdb\fbcore.py", line 560, in exception_from_status
msglist.append('- ' + (msg.value).decode('utf_8'))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte
Welche Version von Firebird und welche Version von FDB? –
@MarkRotteveel Vielen Dank! Habe bereits eine Wurzel des Problems gefunden :) Wirklich, Version 2.0.5 ist sehr-sehr alt und wurde auf meinem Laptop installiert (Nur ein seltenes und altes Programm benutzt diese Version standardmäßig und installiert sie im System). Ich habe auf 2.5.x aktualisiert und alles in Ordnung. – konstov