Opened 10 years ago

Closed 5 years ago

#5574 closed defect (wontfix)

UseExceptions masking proj4 errors

Reported by: bm Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

While testing a script on a machine where python-gdal had been manually installed, several errors appeared of the form: ERROR 6: Unable to load PROJ.4 library (libproj.so), creation of OGRCoordinateTransformation failed.

Adding UseExceptions() at the beginning to catch the error resulted in the errors instead being masked. Attempting to use osr.CoordinateTransformation then resulted in a not so helpful error message: TypeError: in method 'Geometry_Transform', argument 2 of type 'OSRCoordinateTransformationShadow *'

Attachments (1)

gdal_test.py (898 bytes ) - added by bm 9 years ago.
A test script to reproduce the problem

Download all attachments as: .zip

Change History (4)

comment:1 by Jukka Rahkonen, 9 years ago

Could you add a minimal python script for reproducing this behaviour?

by bm, 9 years ago

Attachment: gdal_test.py added

A test script to reproduce the problem

comment:2 by bm, 9 years ago

Script attached. Hopefully the problem is clear. Basically, we want to stop the program with a clear error if there's a problem. We expected that UseExceptions would allow the error to be trapped but it actually caused the error to be masked.

comment:3 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.