You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that invest issues a FutureWarning about using gdal.UseExcpetions(), scripts that invest generates through the Workbench and CLI should probably include that as part of the boilerplate. It seems like it needs to be called before the natcap.invest import to avoid the warning.
As a tangent, I wonder if import time is the best place to issue that FutureWarning. It kind of forces everyone to see it, which is good, but I also might already intend to call gdal.UseExceptions() in my script, I just haven't done it yet because I'm following PEP8 guidelines and doing all my imports first. In that case I don't really want to see the warning everytime.
The text was updated successfully, but these errors were encountered:
I'd be fine with removing the warning, if it's too bothersome. GDAL implemented their similar warning by placing it at the start of a bunch of common functions (OpenEx, ReadArray, etc.) but I don't think that approach is very practical for us
That's interesting. Maybe the CLI or utils.prepare_workspace would be a good place for the warning. That could at least cover all the calls to execute.
Now that invest issues a
FutureWarning
about usinggdal.UseExcpetions()
, scripts that invest generates through the Workbench and CLI should probably include that as part of the boilerplate. It seems like it needs to be called before thenatcap.invest
import to avoid the warning.As a tangent, I wonder if import time is the best place to issue that
FutureWarning
. It kind of forces everyone to see it, which is good, but I also might already intend to callgdal.UseExceptions()
in my script, I just haven't done it yet because I'm following PEP8 guidelines and doing all my imports first. In that case I don't really want to see the warning everytime.The text was updated successfully, but these errors were encountered: