Problems using psycopg2 listen features

Поиск
Список
Период
Сортировка
От Hassan, Aydin
Тема Problems using psycopg2 listen features
Дата
Msg-id A2B8DC2BE91D124A95588B04B02B15AF13F994FB92@EUMBX.wwctrials.com
обсуждение исходный текст
Список psycopg

Hi

 

I am trying to use the notify/listen features of postgres and psycopg2, however when using example code from the documents and running notify.py script in:

/psycopg2-2.4.5/examples$ python notify.py

 

I get the following error when send a notification from postgres:

 

Traceback (most recent call last):

  File "notify.py", line 45, in <module>

    conn.poll()

AttributeError: 'psycopg2._psycopg.connection' object has no attribute 'poll'

 

Not sure why I am getting this error as it is example code?

 

I am running:

 

Python: 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)

Ubuntu:

Distributor ID: Ubuntu

Description:    Ubuntu 10.04.3 LTS

Release:        10.04

Codename:       lucid

 

And the latest psycopg2



This email contains confidential information which may also be legally privileged and subject to protection under the law. It is intended only for the use of the individual or entity named above. If the reader of this email is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby on notice that you are in possession of confidential and privileged information. Any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please return it by email to the sender and delete the copy from your system.
Worldwide Clinical Trials Limited, 1 Fleet Place, London EC4M 7WS is Registered in England No. 6291766

В списке psycopg по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: libpq custom row processing
Следующее
От: Matthieu Rigal
Дата:
Сообщение: Problems between psycopg2 2.4.5 and OS X 10.8 Mountain Lion on libssl.dylib and libcrypto.dylib