<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#000000" text="#ffffff">
On 1/8/2011 3:15 PM, Jürgen E. Fischer wrote:
<blockquote cite="mid:20110108211539.GA27026@norbit.de" type="cite">
<pre wrap="">[please keep the thread on the list. And if you want to do me a favor, use
plain text and reply inline]
Hi Byron,
On Sat, 08. Jan 2011 at 11:30:22 -0600, Byron Como wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On 1/8/2011 11:19 AM, Jürgen E. Fischer wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> Maybe you had oids before?
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">Nope, only the geometry table uses oids. The data tables all have gid,
ineger, as the primary key. In pgadmin the data can be manipulated normally -
copied, pasted, deleted and all the columns are correct.
</pre>
</blockquote>
<pre wrap="">
So you have oids on the geometry table you try to insert, but QGIS is still
complaining?
</pre>
</blockquote>
That is correct.<br>
<blockquote cite="mid:20110108211539.GA27026@norbit.de" type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">The data was created on Windows Xp, Postgresql 8.4, Quantum GIS 1.5. Several
times the data had to be restored to the Windows XP setup for various reasons
including a lightning strike. The restore process worked correctly each time.
The current broken setup is on a Windows 7 box, Postgresql 8.4, PostGIS 1.4,
and Quantum GIS 1.5 and 1.6 have been tried.
</pre>
</blockquote>
<pre wrap="">
On Sat, 08. Jan 2011 at 14:37:27 -0600, Byron Como wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On 1/8/2011 2:29 PM, Jürgen E. Fischer wrote:
</pre>
<blockquote type="cite">
<pre wrap="">The python included in the standalone installer should work. Are you
trying to make it use your python 2.7 installation? If so, that might
cause the problem.
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
I deleted the 2.7 installation and installed 2.5 (see below).<br>
<blockquote cite="mid:20110108211539.GA27026@norbit.de" type="cite">
<pre wrap=""></pre>
<blockquote type="cite">
<pre wrap="">Ah, here's where the whole episode gets murky. The error message occurred
after installing using the 'simplified' installer - before I installed any
extra python software. I decided to install the extra python and psycopg2
packages after failing to find any good suggestions on resolving the
problem searching Google. Your feed back is helpful. Now I know I don't
need the extra python packages. Then is the problem an evironment variable
setting?
</pre>
</blockquote>
<pre wrap="">
Do you have PostgreSQL installed locally? Were PostgreSQL directories added to
the PATH or installed in %WINDIR%\system32. That might interfere.
</pre>
</blockquote>
PostgreSQL is in c:\program files (x86)<br>
<br>
My path statement is:<br>
PATH=C:\OSGeo4W\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;<br>
C:\Windows\System32\WindowsPowerShell\v1.0\;C:\OSGeo4W\apps\msys\bin<br>
<br>
<blockquote cite="mid:20110108211539.GA27026@norbit.de" type="cite">
<pre wrap="">
Try "import psycopg2" in the python console (or a python started from the
OSGeo4W shell). It's output might shed some light on the problem.
</pre>
</blockquote>
>>> import psycopg2<br>
>>> psycopg2<br>
<module 'psycopg2' from
'C:\OSGeo4W\apps\Python25\lib\site-packages\psycopg2\__init__.pyc'><br>
<br>
<blockquote cite="mid:20110108211539.GA27026@norbit.de" type="cite">
<pre wrap="">
Maybe it's not just a python problem and is somehow related to the primary key
problem.
Jürgen
</pre>
</blockquote>
I installed Qgis 1.5 using the 'simplified' installer.<br>
Got a strange 'can't find the psycopg2' file from PostGis Manager.<br>
To fix THAT error I did:<br>
<br>
Installed Python 2.5.4<br>
Installed psycop2.2.2w32<br>
Copied the resulting psycop2 directory into the <br>
<a>C:\Program Files (x86)\Quantum GIS
Tethys\apps\Python25\Lib\site-packages\psycopg2</a><br>
<br>
...and the error message went away.<br>
<br>
The missing primary key is occurring in v1.5 and 1.6 using the
simplified install and the 1.6 OSGeo4W install.<br>
<br>
All this to try and use Quantum GIS on Windows 7 64 bit.<br>
</body>
</html>