-
Notifications
You must be signed in to change notification settings - Fork 136
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
Test clipBoth does not raise exception for invalid filenames #170
Comments
Hi Oh! Ok we can use layer.isValid() to check they are ok. There is no return type since in the underlying C++ implementation , constructors always have a void return type. Regards Tim |
Yep great - I thought it'd be something like that.... Cheers On Mon, Jun 4, 2012 at 5:36 PM, Tim Sutton <
|
I have changed the test to use .isValid() in 76f59d1 For Raster layers the error message is ERROR 4: `OEk_tnshoeu_439_kstnhoe' does not exist in the file system, and is not recognised as a supported dataset name. QgsRasterLayer::setDataProvider: Data provider is invalid. for vector layers it is simply Data source is invalid In case of non-existing files, I think both Python bindings should either
|
Seems we both did the same changes (see above). How does that work? |
Attempting to suppress qgis textual errors was behind commit #34a583c6d4b72abc4479a9a8416e1d5be3c379eb but seems to have caused problem in issue #176 |
Came across this when moving data files from inasafe_data/test to inasafe_data/hazard
The test clipBoth does not raise an exception when the filename is missing - rather it gives the misleading message
"Western boundary must be less than eastern. I got [0.0, 0.0, 0.0, 0.0]"
The issue is with the code
It turns out that QgsRasterLayer (or QgsVectorLayer for that matter) do not return None when filename is invalid.
I made a specific test for this (disabled for the time being):
So think there are 3 options:
The text was updated successfully, but these errors were encountered: