postgis-layer-viewer
postgis-layer-viewer copied to clipboard
Unable to run in Debian GNU/Linux release 9 _Stretch_.
I tried to run this software you have created because I am to query PostGIS, but I wasn't being able to get qgis
working smoothly and not becoming unresponsive. But I think I figured it out at last, so I won't be pursuing your solution any longer while I can. Anyway this was happening when running on Debian:
$ uname -a
Linux uam32d9 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.2 (stretch)
Release: 9.2
Codename: stretch
$ python3 ./postgis_viewer.py -h $MY_HOST -p $MY_PORT -U $MY_USER -W $MY_PASS_WORD -d $MY_DATA_BASE -s $MY_SCHEMA -t $MY_TABLE
File "./postgis_viewer.py", line 275
print 'I: Loading the layer...'
^
SyntaxError: Missing parentheses in call to 'print'
$ python2 ./postgis_viewer.py -h $MY_HOST -p $MY_PORT -U $MY_USER -W $MY_PASS_WORD -d $MY_DATA_BASE -s $MY_SCHEMA -t $MY_TABLE
I: Starting viewer ...
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL3 QMYSQL QSPATIALITE
E: Error. Exiting ...
Basic PostGIS viewer based on QGIS libs. (v.1.6.1)
Usage: postgis_viewer.py <options>
Options:
-h host
-p port
-U user
-W password
-d database
-s schema
-t table
Prerequisities:
Qt, QGIS, libqt4-sql-psql
Using as PgAdmin plugin, copy 'postgis_viewer.py' file on PATH and put following
to 'plugins.ini' (/usr/share/pgadmin3/plugins.ini on Debian):
Title=View PostGIS layer
Command=postgis_viewer.py -h $$HOSTNAME -p $$PORT -U $$USERNAME -W $$PASSWORD -d $$DATABASE -s $$SCHEMA -t $$OBJECTNAME
Description=View PostGIS layer
Platform=unix
ServerType=postgresql
Database=Yes
SetPassword=Yes
Authors:
Copyright (c) 2010 by Ivan Mincik, [email protected]
Copyright (c) 2011-2015 Germán Carrillo, [email protected]
License: GNU General Public License v2.0
$ aptitude search ^lib* | grep qpsql | head
$ aptitude search ^lib* | grep libc | head
p libc++-dev - LLVM C++ Standard library (development files)
p libc++-dev:i386 - LLVM C++ Standard library (development files)
p libc++-helpers - LLVM C++ Standard library - build helpers
v libc++-helpers:i386 -
p libc++-test - LLVM C++ Standard library (test cases)
p libc++-test:i386 - LLVM C++ Standard library (test cases)
p libc++1 - LLVM C++ Standard library
p libc++1:i386 - LLVM C++ Standard library
p libc++abi-dev - LLVM low level support for a standard C++ library (development files)
p libc++abi-dev:i386 - LLVM low level support for a standard C++ library (development files)
$ figlet D:
____
| _ \ _
| | | (_)
| |_| |_
|____/(_)
$ _
Python 3 is not yet supported. When QGIS v3 is released I'll try to make some time to migrate the PostGIS Layer Viewer to Python 3 and PyQt5.