Thread: Fwd: autocommit linux error
-------- Исходное сообщение --------
Тема: | autocommit linux error |
---|---|
Дата: | Tue, 26 Jul 2011 15:32:39 +0400 |
От: | Владимир Апарин <sinopteek@gmail.com> |
Кому: | DanieleVarrazzo@gmail.com, saschpe@suse.de |
I want to use autocommiting in my code, i wrote code, that working on windows.
But when i try to run him on linux, i recieve error
AttributeError: 'psycopg2._psycopg.connection' object has no attribute 'autocommit'system: OpenSuSe 11.4x64.
https://build.opensuse.org/package/show?package=python-psycopg2&project=devel%3Alanguages%3Apython
On Tue, Jul 26, 2011 at 12:49 PM, Владимир Апарин <sinopteek@gmail.com> wrote: > I want to use autocommiting in my code, i wrote code, that working on windows. > But when i try to run him on linux, i recieve error > > AttributeError: 'psycopg2._psycopg.connection' object has no attribute 'autocommit' > > system: OpenSuSe 11.4x64. > packet python-psycopg2-2.4-1.1 from obs://build.opensuse.org/devel:languages:python (official repo) > https://build.opensuse.org/package/show?package=python-psycopg2&project=devel%3Alanguages%3Apython Autocommit was introduced in psycopg 2.4.2. In previous version you have to use conn.set_isolation_level(0). Cheers, -- Daniele