I think this is the same problem being discussed in Postgis ML. See the archive,
[postgis-users] OIDS, PostGIS and Quantum GIS http://www.mail-archive.com/[email protected]/msg07446.html Noli On 1/9/11, Byron Como <[email protected]> wrote: > On 1/8/2011 3:15 PM, Jürgen E. Fischer wrote: >> [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: >>> On 1/8/2011 11:19 AM, Jürgen E. Fischer wrote: >>>> Maybe you had oids before? >>> 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. >> So you have oids on the geometry table you try to insert, but QGIS is >> still >> complaining? > That is correct. >> >>> 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. >> On Sat, 08. Jan 2011 at 14:37:27 -0600, Byron Como wrote: >>> On 1/8/2011 2:29 PM, Jürgen E. Fischer wrote: >>>> 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. > I deleted the 2.7 installation and installed 2.5 (see below). >>> 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? >> >> Do you have PostgreSQL installed locally? Were PostgreSQL directories >> added to >> the PATH or installed in %WINDIR%\system32. That might interfere. > PostgreSQL is in c:\program files (x86) > > My path statement is: > PATH=C:\OSGeo4W\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; > C:\Windows\System32\WindowsPowerShell\v1.0\;C:\OSGeo4W\apps\msys\bin > >> 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. > >>> import psycopg2 > >>> psycopg2 > <module 'psycopg2' from > 'C:\OSGeo4W\apps\Python25\lib\site-packages\psycopg2\__init__.pyc'> > >> Maybe it's not just a python problem and is somehow related to the primary >> key >> problem. >> >> >> Jürgen >> > I installed Qgis 1.5 using the 'simplified' installer. > Got a strange 'can't find the psycopg2' file from PostGis Manager. > To fix THAT error I did: > > Installed Python 2.5.4 > Installed psycop2.2.2w32 > Copied the resulting psycop2 directory into the > C:\Program Files (x86)\Quantum GIS > Tethys\apps\Python25\Lib\site-packages\psycopg2 > > ...and the error message went away. > > The missing primary key is occurring in v1.5 and 1.6 using the > simplified install and the 1.6 OSGeo4W install. > > All this to try and use Quantum GIS on Windows 7 64 bit. > _______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
