[Featureserver] configuration for postgis datasource
John Cartwright
john.c.cartwright at comcast.net
Wed Oct 31 12:57:27 EDT 2007
Hello All,
I seem to be having a little trouble configuring Featureserver (1.10) to
use a postgis datasource. I've set the following in featureserver.cfg:
> [hurricanes]
> type=PostGIS
> dsn=dbname=mydb user=myuser password=mypass host=postgres1 port=5432
> layer=hurricanes
> fid=gid
> geometry=shape
but am finding that I get the exception:
An error occurred: int argument required
File "/extra/contrib/apache-2.2.4/cgi-bin/featureserver/FeatureServer/Server.py", line 273, in cgiHandler
format, content = service.dispatchRequest( params, path_info, host, post_data, request_method, accepts )
File "/extra/contrib/apache-2.2.4/cgi-bin/featureserver/FeatureServer/Server.py", line 137, in dispatchRequest
result = method(action)
File "/extra/contrib/apache-2.2.4/cgi-bin/featureserver/FeatureServer/DataSource/PostGIS.py", line 147, in select
cursor.execute(str(sql), {self.fid_col: action.id})
I'm assuming that the dsn parameter does not get quoted, otherwise
featureserver complains about the dbname value The string "dbname=mydb
user=myuser password=mypass host=postgres1 port=5432" is a valid DSN
outside of featureserver. I'm using psycopg2-2.0.6 for the postgres
driver. Can someone point out what I'm doing wrong here?
Thanks!
-- john
More information about the Featureserver
mailing list