psycopg2 error in django

22 views
Skip to first unread message

li liren

unread,
Apr 28, 2007, 8:39:17 AM4/28/07
to django...@googlegroups.com

In django I use psycopg2 to connect to postgresql
I test the DB setting in setting.py:
>>> from django.db import connnection
>>> cursor = connection.cursor()

psyco_connect: dsn = 'user=**** dbname=test password='********''
connection_setup: init connection object at 01460568, refcnt = 1
conn_connect: new postgresql connection at 0144F150
conn_connect: using protocol 2
connection_setup: good connection object at 01460568, refcnt = 1
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Python25\lib\site-packages\django\db\backends\postgresql_psycopg2\bas
e.py", line 50, in cursor
    self.connection.set_isolation_level(1) # make transactions transparent to al
l cursors
AttributeError: 'psycopg2._psycopg.connection' object has no attribute 'set_isol
ation_level'
 
what's this error? How can I solve this?

Malcolm Tredinnick

unread,
Apr 28, 2007, 8:45:55 AM4/28/07
to django...@googlegroups.com

I've never seen this problem reported before, so it's not a common
issue, that's for sure.

What version of psycopg2 are you using? What version of PostgreSQL?

Regards,
Malcolm

>

li liren

unread,
Apr 28, 2007, 8:52:28 AM4/28/07
to django...@googlegroups.com
postgresql-8.2.3 and psycopg2-2.0.5.1.win32-py2.5-pg8.2.0

 
2007/4/28, Malcolm Tredinnick <mal...@pointy-stick.com>:
Reply all
Reply to author
Forward
0 new messages