Skip site navigation (1) Skip section navigation (2)

Problems using psycopg2 listen features

From: "Hassan, Aydin" <aydin(dot)hassan(at)wwctrials(dot)com>
To: "'psycopg(at)postgresql(dot)org'" <psycopg(at)postgresql(dot)org>
Subject: Problems using psycopg2 listen features
Date: 2012-08-22 09:10:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: psycopg

I am trying to use the notify/listen features of postgres and psycopg2, however when using example code from the documents and running script in:
/psycopg2-2.4.5/examples$ python

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

Traceback (most recent call last):
  File "", line 45, in <module>
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)
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 by date

Next:From: Matthieu RigalDate: 2012-08-24 12:16:00
Subject: Problems between psycopg2 2.4.5 and OS X 10.8 Mountain Lion on libssl.dylib and libcrypto.dylib
Previous:From: Marko KreenDate: 2012-08-07 20:28:28
Subject: Re: libpq custom row processing

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group