|
работа с firebird под python
|
|||
---|---|---|---|
#18+
Кто-нибудь работал с библиотекой fdb для python? Я в базе firebird создала триггер: CREATE OR ALTER TRIGGER DATE_VALUE_BI2 FOR DATE_VALUE ACTIVE BEFORE INSERT POSITION 2 AS BEGIN post_event 'new_date'; END чтобы получать уведомления как только в таблицу DATE_VALUE добавляются новые данные. На python использую библиотеку fdb: import fdb our_pathDB='D:\COUNTERS.FDB'#'D:\COUNTERS.FDB' /var/lib/firebird/2.5/COUNTERS.FDB /home/pi/kpu/COUNTERS.FDB our_userDB='sysdba' our_passwordDB='masterkey' our_hostDB='127.0.0.1' con = fdb.connect(database=our_pathDB, host=our_hostDB, user=our_userDB, password=our_passwordDB,charset= 'WIN1251') conduit = con.event_conduit(['new_date']) result = conduit.wait() print result conduit.close() con.close() При запуске возникает следующая ошибка: Traceback (most recent call last): File "H:/����/���������/Analise_KPU/post_event.py", line 23, in <module> result = conduit.wait() File "C:\Python27\lib\site-packages\fdb\fbcore.py", line 2088, in wait raise ProgrammingError("Event collection not initialized. It's necessary to call begin().") fdb.fbcore.ProgrammingError: Event collection not initialized. It's necessary to call begin(). Exception AttributeError: "'EventConduit' object has no attribute '_EventConduit__process_thread'" in <bound method Connection.__del__ of <fdb.fbcore.Connection object at 0x01B35D30>> ignored В чем может быть дело? ... |
|||
:
Нравится:
Не нравится:
|
|||
27.12.2017, 16:53 |
|
|
start [/forum/topic.php?fid=23&fpage=27&tid=1460420]: |
0ms |
get settings: |
11ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
33ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
30ms |
get tp. blocked users: |
2ms |
others: | 14ms |
total: | 129ms |
0 / 0 |