Thread: psycopg2 Operational Error
Hello,
I am working on one of my project which use psycopg2 to connect with Postgresql 8.4. At the time of installation, I install postgresql 8.4 and psycopg2-2.-2.3.2 latest version of Psyscopg2.
When I tried to create connection with my database under Postgres 8.4, it create the connection. But failed to load database through script.
It's gives me error as follow:
psycopg2.OperationalError: could not access file "/usr/lib/postgresql/8.3/lib/plpgsql.so": No such file or directory
I don't understand why psycopg2 trying to use postgres-8.3, is it hard coded value somewhere in the code. I tried to search but I didn't find any such entry in the code.
Can anyone suggest me solution for the same.
--
Ganesh (Dragger)
Be a FOSSERS, use GNU/Linux
I am working on one of my project which use psycopg2 to connect with Postgresql 8.4. At the time of installation, I install postgresql 8.4 and psycopg2-2.-2.3.2 latest version of Psyscopg2.
When I tried to create connection with my database under Postgres 8.4, it create the connection. But failed to load database through script.
It's gives me error as follow:
psycopg2.OperationalError: could not access file "/usr/lib/postgresql/8.3/lib/plpgsql.so": No such file or directory
I don't understand why psycopg2 trying to use postgres-8.3, is it hard coded value somewhere in the code. I tried to search but I didn't find any such entry in the code.
Can anyone suggest me solution for the same.
--
Ganesh (Dragger)
Be a FOSSERS, use GNU/Linux
When I tried to create connection with my database under Postgres 8.4, it create the connection. But failed to load database through script.
It's gives me error as follow:
psycopg2.OperationalError: could not access file "/usr/lib/postgresql/8.3/lib/plpgsql.so": No such file or directory
I am quite sure that psycopg2 is passing on the error PostgreSQL server is giving.
And I gutess "load database through script" refers to "Ganesh has a database dump which he is trying to upload via python + psycopg2"
So, please look at your datbase dump. Is somewhere within that dump something along "create procedural language plpgsql ...... plpgsql.so" ??? THAT is source of the error.
Best wishes
Harald
Harald Armin Massa www.2ndQuadrant.com
PostgreSQL Training, Services and Support
On Tue, Jan 18, 2011 at 01:35:22PM +0100, Harald Armin Massa wrote: > > When I tried to create connection with my database under Postgres 8.4, it > > create the connection. But failed to load database through script. > > > > It's gives me error as follow: > > > > psycopg2.OperationalError: could not access file > > "/usr/lib/postgresql/8.3/lib/plpgsql.so": No such file or directory > > > > I am quite sure that psycopg2 is passing on the error PostgreSQL server is > giving. > > And I gutess "load database through script" refers to "Ganesh has a database > dump which he is trying to upload via python + psycopg2" > > So, please look at your datbase dump. Is somewhere within that dump > something along "create procedural language plpgsql ...... plpgsql.so" ??? > THAT is source of the error. Quite apart from the fact that said "database dump" might contain psql-specific commands which python+psycopg2 will be quite confused about. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
Thanks, for pointing me in right direction.
Problem get solved. error occurs due to " value of plpgsql_call handler written explicitely to search for 8.3" in my sql file.
On Tue, Jan 18, 2011 at 6:10 PM, Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
On Tue, Jan 18, 2011 at 01:35:22PM +0100, Harald Armin Massa wrote:Quite apart from the fact that said "database dump" might
> > When I tried to create connection with my database under Postgres 8.4, it
> > create the connection. But failed to load database through script.
> >
> > It's gives me error as follow:
> >
> > psycopg2.OperationalError: could not access file
> > "/usr/lib/postgresql/8.3/lib/plpgsql.so": No such file or directory
> >
> > I am quite sure that psycopg2 is passing on the error PostgreSQL server is
> giving.
>
> And I gutess "load database through script" refers to "Ganesh has a database
> dump which he is trying to upload via python + psycopg2"
>
> So, please look at your datbase dump. Is somewhere within that dump
> something along "create procedural language plpgsql ...... plpgsql.so" ???
> THAT is source of the error.
contain psql-specific commands which python+psycopg2 will be
quite confused about.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
--
Sent via psycopg mailing list (psycopg@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/psycopg
--
Ganesh (Dragger)
Be a FOSSERS, use GNU/Linux