[gdal-dev] mod_python problems, bigtiff

Andreas Neumann a.neumann at carto.net
Thu Oct 16 11:27:53 EDT 2008


Hi,

I have a very simple python script that queries some metadata from raster
images. The script works fine on the console and in a web application with
mod_python. I am still rather new to python and mod_python.

A problem arises when I query meta information of big tiff files, larger
than 4GB. In this case the script works fine when I run it from the
command line, but fails when I run it from the server with mod_python.

Here is the error message from the apache error-log:

--------------

[Thu Oct 16 17:22:00 2008] [notice] mod_python (pid=32194,
interpreter='srv139.stadt-uster.ch'): Importing module
'/home/www/www/datenextraktion_dev/extract_meta.py'
ERROR 1:
/home/www/mapserverdata/orthofotos/release_2008/orthofoto_2008.tif:This is
a BigTIFF file.  This format not supported
by this version of libtiff.
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] mod_python
(pid=32194, interpreter='srv139.stadt-uster.ch', phase='PythonHandler',
handler='mod_python.publisher'): Application error
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] ServerName:
'srv139.stadt-uster.ch'
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] DocumentRoot:
'/home/www/www/'
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] URI:
'/datenextraktion_dev/extract_meta.py/raster'
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] Location: None
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] Directory: '/'
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] Filename:
'/home/www/www/datenextraktion_dev/extract_meta.py'
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] PathInfo: '/raster'
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] Traceback (most
recent call last):
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101]   File
"/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in
HandlerDispatch\n    default=default_handler, arg=req,
silent=hlist.silent)
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101]   File
"/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in
_process_target\n    result = _execute_target(config, req, object, arg)
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101]   File
"/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in
_execute_target\n    result = object(arg)
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101]   File
"/usr/lib/python2.5/site-packages/mod_python/publisher.py", line 213, in
handler\n    published = publish_object(req, object)
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101]   File
"/usr/lib/python2.5/site-packages/mod_python/publisher.py", line 425, in
publish_object\n    return publish_object(req,util.apply_fs_data(object,
req.form, req=req))
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101]   File
"/usr/lib/python2.5/site-packages/mod_python/util.py", line 554, in
apply_fs_data\n    return object(**args)
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101]   File
"/home/www/www/datenextraktion_dev/extract_meta.py", line 18, in raster\n 
 
req.write('\\t<driver>'+dataset.GetDriver().ShortName+'/'+dataset.GetDriver().LongName+'</driver>\\n')
[Thu Oct 16 17:22:00 2008] [error] [client 192.168.1.101] AttributeError:
'NoneType' object has no attribute 'GetDriver'

------------

My guess was that mod_python picks up a different version of gdal.py and
the osgeo package but I can only find one installation of gdal.py on the
server. I also explicitly set the paths to the packages/modules in the
apache config:

PythonOption mod_python.importer.path
"['/usr/local/lib/python2.5/site-packages','/usr/lib/python2.5/site-packages']"

Are there any other ideas why my script works in the command line and not
in the web environment?

Thanks,
Andreas

-- 
Andreas Neumann
Böschacherstrasse 6, CH-8624 Grüt/Gossau, Switzerland
Email: a.neumann at carto.net, Web:
* http://www.carto.net/ (Carto and SVG resources)
* http://www.carto.net/neumann/ (personal page)
* http://www.svgopen.org/ (SVG Open Conference)
* http://www.geofoto.ch/ (Georeferenced Photos of Switzerland)



More information about the gdal-dev mailing list