pydev and psycopg2 - weird behaviour

Fabio Zadrozny fabiofz at gmail.com
Sat Jul 5 07:34:56 EDT 2008


Hi Ross,

Usually that happens when some module contains too much runtime information
and the static analysis cannot get it... You can probably fix that by adding
'psycopg2' to the list of builtin modules... See
http://fabioz.com/pydev/manual_101_interpreter.html for information on how
to configure that (look for forced builtins).

Cheers,

Fabio

On 7/4/08, RossGK <Ross at nomail.spam.thanks> wrote:
>
>
> I've been using pydev for a short while successfully, and Django with
> postgresql as well.  psycopg2 is part of that behind the scenes I would
> imagine, to make django work.
>
> Now I'm trying to use psycopg2 in a non-Django program, I'm seeing some
> weird behaviour
>
> My "import psycopg2" is tagged in pyDev (eclipse) as "Unresolved Import:
> psycopg2"
>
> But when I run my code anyway, I seem to connect to the postgresql DB okay.
>  If I remove the import, and try it, it fails.
>
> So it seems to use it, but thinks it's unresolved.  Any idea what's going
> on there?
>
> Just to be sure it's installed right, I reinstalled with no change. I also
> opened a python shell (cmd window in winXP environment) and on the command
> line issued a psycopg2 connect request which succeeds as well. So it mostly
> seems to be an erroneous report from pydev that it can't resolve psycopg2
> when it apparently can?
>
> Your input appreciated...
>
> Ross.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080705/1e3edf3d/attachment-0001.html>


More information about the Python-list mailing list