KinterbaseDB verursacht Fehler -901

26.04.2011 - Lesezeit: ~1 Minute

Was in Kubuntu 10.04 noch funktioniert hatte, ruft in Kubuntu 10.10 diesen Fehler hervor:

(Kubuntu 10.10 amd64 - python 2.6 - Firebird 2.5 Super - kinterbasdb 3.2)

kinterbasdb.OperationalError: (-901, 'begin transaction: \n invalid parameter in transaction parameter block\n Table reservation lock type isc_tpb_shared requires table name before in TPB')

~~~ Traceback (most recent call last): File "wnf_fib.py", line 60, in db.list_Adr() File "wnf_fib.py", line 47, in list_Adr dt_Adr.execute("SELECT ID,KURZ,STR,TEL1 FROM KO_ADR ORDER BY STR") kinterbasdb.OperationalError: (-901, 'begin transaction: \n invalid parameter in transaction parameter block\n Table reservation lock type isc_tpb_shared requires table name before in TPB') ~~~ Hier fand ich einige Ausführungen dazu: - [www.python-it.org/forum/index.php?topic=5108.0](http://www.python-it.org/forum/index.php?topic=5108.0) - [www.firebirdsql.org/devel/python/docs/3.3.0/beyond-python-db-api.html](http://www.firebirdsql.org/devel/python/docs/3.3.0/beyond-python-db-api.html) Also habe ich zusätzlich einen CustomTPB (transaction parameter buffers) eingeführt. ~~~ def connect(self): self.svc = kinterbasdb.services.connect(host=self.Server, user=self.User, password=self.Passwort) dsn="%s:/%s" % (self.Server,self.Datenbank) self.con = kinterbasdb.connect(dsn=dsn, user=self.User, password=self.Passwort) self.customTPB = ( kinterbasdb.isc_tpb_write + kinterbasdb.isc_tpb_read_committed + kinterbasdb.isc_tpb_rec_version) self.con.begin(tpb=self.customTPB) return True ~~~ Und jetzt funktioniert es wieder. Tags: Python KinterbaseDB Kubuntu 10.10

Entwicklungsumgebung für Python und ZODB einrichten

14.03.2010 - Lesezeit: ~1 Minute

Aus dem Workshop auf dem Chemnitzer Linuxtag 2010

#für virtuelle Umgebung installieren  
sudo apt-get install python-virtualenv  
#Vorbereitung für ZODB3 installieren  
sudo apt-get install build-essential  
sudo apt-get install python-dev  

#eine virtuelle Umgebung anlegen  
~$ virtualenv test --no-site-packages  

#in den Projektpfad wechseln  
cd test/  

#ZODB3 installieren  
./bin/easy_install ZODB3  
Tags: Python