[Featureserver] No such file or directory when reading WFS from postGIS

Christopher Schmidt crschmidt at metacarta.com
Fri Jan 18 18:13:07 EST 2008


On Fri, Jan 18, 2008 at 04:50:33PM -0600, Ed Fialkowski wrote:
> Hi all, I'm having an issue setting up my Featureserver to read from
> postGIS.  I have python configured correctly, and using psycopg2 I can
> connect and execute statements to my postGIS database, but when I try
> featureserver.cgi through the browser, I get the following:

I'm confused: Are you using PostGIS, or DBM? It looks like DBM -- or at
least there is a DBM datasource in the config file. Is that true? It
seems like the file in question in the DBM data source doesn't exist --
which probably, more directly, means that the directory doesn't exist
(otherwise it would be able to create the file, that's the "c" option).

Remove that DBM datasource, if you're not using it? Otherwise, post your
config file here, and we'll go from there. 

> An error occurred: (2, 'No such file or directory')
>   File "/opt/lampp/cgi-bin/featureserver2/FeatureServer/Server.py",
> line 247, in cgiHandler
>     service = Server.load(*cfgfiles)
>   File "/opt/lampp/cgi-bin/featureserver2/FeatureServer/Server.py",
> line 68, in _load
>     datasources[section] = cls.loadFromSection(
>   File "/opt/lampp/cgi-bin/featureserver2/FeatureServer/Server.py",
> line 49, in _loadFromSection
>     return objclass(section, **objargs)
>   File "/opt/lampp/cgi-bin/featureserver2/FeatureServer/DataSource/DBM.py",
> line 21, in __init__
>     self.db = Recno( args["file"] )
>   File "/opt/lampp/cgi-bin/featureserver2/FeatureServer/DataSource/DBM.py",
> line 146, in __init__
>     self.data  = anydbm.open( file, "c" )
>   File "/usr/lib/python2.4/anydbm.py", line 83, in open
>     return mod.open(file, flag, mode)
>   File "/usr/lib/python2.4/dbhash.py", line 16, in open
>     return bsddb.hashopen(file, flag, mode)
>   File "/usr/lib/python2.4/bsddb/__init__.py", line 299, in hashopen
>     d.open(file, db.DB_HASH, flags, mode)
> 
> and then in tomcat's error log:
> 
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106] Exception
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106]
> exceptions.AttributeError
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106] :
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106] "
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106] '
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106] R
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106] e
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106] c
> etc., etc., with 1 letter per line, but here's the gist:
> 
> "'Recno' object has no attribute 'max'" in
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106] <bound method
> Recno.__del__ of <FeatureServer.DataSource.DBM.Recno object at 0xb7d8bbac>>
> [Fri Jan 18 11:06:17 2008] [error] [client 128.252.167.106]  ignored
> 

The latter is expected behavior. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list