473,804 Members | 3,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pydev and psycopg2 - weird behaviour


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.
Jul 4 '08 #1
0 1406

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
383
by: mvanier | last post by:
There was a thread a while back dealing with an error message the psycopg2 Postgres interface gives when trying to convert some mxDateTime values: "can't adapt". The answer given was that psycopg2 wasn't finding the mxDateTime include files during setup, so it assumed they weren't there. I'm having the same problem. I've installed both packages from source. However, as far as I can tell, the mxDateTime include files are never copied to...
2
3007
by: Luis P. Mendes | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I've inserted a couple hundred rows in a table in Postgres via psycopg2. The first field of each row is a certain unix time (since epoch) when an event occured. When I try to access that database with psycopg2, I get rounded values
1
1878
by: Maxim Sloyko | last post by:
Hello, clp and all people reading it! Recently I was porting my (small) app from psycopg to psycopg2 (they got me with this "2"). I read, that psycopg2 supports all features of psycopg and plus many more, however, when I started to port, I discovered, that psycopg2 lacks serialized connections and "commit on cursor" completely. Did I miss something or psycopg2 just isn't mature enough yet? BTW, is there any postgresql engine, that can...
2
6172
by: Luis P. Mendes | last post by:
Hi, I've installed psycopg2 under Slacware 11.0 along with PostgreSQL 8.2.4. When I run the python shell I get the following error: lupe@lince ~$ python Python 2.4.3 (#1, Jul 26 2006, 20:13:39) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "<stdin>", line 1, in ?
2
2257
by: Jon Clements | last post by:
Hi All. I'm using psycopg2 to retrieve results from a rather large query (it returns 22m records); unsurprisingly this doesn't fit in memory all at once. What I'd like to achieve is something similar to a .NET data provider I have which allows you to set a 'FetchSize' property; it then retrieves 'n' many rows at a time, and fetches the next 'chunk' after you read past the end of the current chunk. I suppose I could use Python for .NET...
0
1624
by: David Michael Schruth, | last post by:
Hi, I am sort of in a jam here. I am using the PsycoPG2 library to read data out of a windows XP based PostGIS / PostGreSQL database but I am apparently unable to write (update or insert) even though I am able to read (select) I am using PsycoPG2 2.0.6 (psycopg2-2.0.6.win32-py2.5-pg8.2.4- release.exe ) with Python 2.5 (python-2.5.msi)
4
2924
by: Andre' John | last post by:
Hi I am trying to do this for a Postgresql database: conn = psycopg2.connect('host=localhost') cur = conn.cursor() cur.execute("SELECT * FROM names WHERE name=%s", ) , which doesn't work, and neither does
0
1021
by: Fabio Zadrozny | last post by:
Hi All, Pydev and Pydev Extensions 1.3.16 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions: -----------------------------------------------------------------
1
2186
by: George Sakkis | last post by:
I have a simple DB table that stores md5 signature pairs: Table "public.duplicate" Column | Type | Modifiers ----------+-------+----------- sig | bytea | not null orig_sig | bytea | not null Indexes: "duplicate_pkey" PRIMARY KEY, btree (sig) "ix_duplicate_orig_sig" btree (orig_sig)
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7623
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.