Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neither gdal.UseExceptions() nor gdal.DontUseExceptions()... #10010

Closed
jidanni opened this issue May 27, 2024 · 1 comment · Fixed by #10039
Closed

Neither gdal.UseExceptions() nor gdal.DontUseExceptions()... #10010

jidanni opened this issue May 27, 2024 · 1 comment · Fixed by #10039
Assignees

Comments

@jidanni
Copy link
Contributor

jidanni commented May 27, 2024

Feature description

$ ogrmerge -o all.kmz 0.labels.kmz 0.contours.kmz
/usr/lib/python3/dist-packages/osgeo/gdal.py:312: FutureWarning: Neither gdal.UseExceptions() nor gdal.DontUseExceptions() has been explicitly called. In GDAL 4.0, exceptions will be enabled by default.

$ gdal2xyz 0.tif /dev/stdout|wc
/usr/lib/python3/dist-packages/osgeo/gdal.py:312: FutureWarning: Neither gdal.UseExceptions() nor gdal.DontUseExceptions() has been explicitly called. In GDAL 4.0, exceptions will be enabled by default.
  warnings.warn(
  65537  196611 1944763

I'm not sure if qgis/QGIS#57477 covers it yet (I'm using GDAL 3.9).

@jratike80
Copy link
Collaborator

I guess that this issue is covered by #7452 which is also why the warning is printed.

@rouault rouault self-assigned this May 27, 2024
rouault added a commit to rouault/gdal that referenced this issue May 27, 2024
…hen launched from launcher shell scripts

Fixes OSGeo#10010

The launcher shell scripts generated by setuptools don't use our
gdal-utils/scripts/{script_name}.py scripts, but directly the gdal-utils/osgeo_utils/{script_name}.py one.
Hence let's move the call to UseExceptions() from the former to the
later.
rouault added a commit to rouault/gdal that referenced this issue May 28, 2024
…hen launched from launcher shell scripts

Fixes OSGeo#10010

The launcher shell scripts generated by setuptools don't use our
gdal-utils/scripts/{script_name}.py scripts, but directly the gdal-utils/osgeo_utils/{script_name}.py one.
Hence let's move the call to UseExceptions() from the former to the
later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants