-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Some GDAL processing tools raise exceptions if active layer is unavailable #51958
Closed
2 tasks done
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Processing
Relating to QGIS Processing framework or individual Processing algorithms
Comments
kannes
added
the
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
label
Feb 21, 2023
This was referenced Feb 21, 2023
agiudiceandrea
added
the
Processing
Relating to QGIS Processing framework or individual Processing algorithms
label
Feb 21, 2023
It seems to me the issue doesn't occur on my Windows system with QGIS 3.28.3: gdalprocessing.mp4 |
nyalldawson
added a commit
to nyalldawson/QGIS
that referenced
this issue
Feb 23, 2023
GDAL commands for invalid layers This is a partial fix, which at least removes the uncaught exception. Ideally we'd gracefully fall back to using the layer's source (even if it doesn't exist!) in the generated GDAL commands. But that's far from trivial to do. Fixes qgis#51958
nyalldawson
added a commit
that referenced
this issue
Feb 23, 2023
GDAL commands for invalid layers This is a partial fix, which at least removes the uncaught exception. Ideally we'd gracefully fall back to using the layer's source (even if it doesn't exist!) in the generated GDAL commands. But that's far from trivial to do. Fixes #51958
qgis-bot
pushed a commit
that referenced
this issue
Feb 23, 2023
GDAL commands for invalid layers This is a partial fix, which at least removes the uncaught exception. Ideally we'd gracefully fall back to using the layer's source (even if it doesn't exist!) in the generated GDAL commands. But that's far from trivial to do. Fixes #51958
nyalldawson
added a commit
that referenced
this issue
Feb 27, 2023
GDAL commands for invalid layers This is a partial fix, which at least removes the uncaught exception. Ideally we'd gracefully fall back to using the layer's source (even if it doesn't exist!) in the generated GDAL commands. But that's far from trivial to do. Fixes #51958
Thanks a lot, @nyalldawson! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Processing
Relating to QGIS Processing framework or individual Processing algorithms
What is the bug or the crash?
Some GDAL processing tools raise exceptions if active layer is unavailable
Steps to reproduce the issue
Set up an unavailable layer, e.g. by moving a referenced file or by breaking WFS access like this:
localhost
and the port to a port where you do not have a proxy running (e.g.34567
probably)ms:inv80_lgeomorph
fromhttp://maps.zh.ch/wfs/FnsNSWFS
(random result from web search)At this stage QGIS should show a warning sign next to the layer in the layer tree. If so, continue:
gdal:buffervectors
,gdal:dissolve
orgdal:ogrinfo
(other vector tools did not raise this exception for me).You will get a yellow "Python error" message and a stack trace like this:
The tool should fail later or differently, with a user-friendly message, not a traceback. Other tools seem to simply not pre-populate their input comboboxes with this layer.
Versions
Supported QGIS version
New profile
Additional context
I did not test raster tools similarly.
The text was updated successfully, but these errors were encountered: