Opened 9 years ago
Closed 9 years ago
#1199 closed defect (fixed)
WCST_Import error index out of range with recipe "wcs_extract"
Reported by: | Bang Pham Huu | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 10.0 |
Component: | wcst_import | Version: | development |
Keywords: | wcst_import error | Cc: | Alex Dumitru |
Complexity: | Medium |
Description
I tried to ingest a coverage with recipe "wcs_extract" from local petascope with recipe ( coverage does exist in petascope named "mean_summerair_temp" ).
{ "config": { "service_url": "http://localhost:8088/rasdaman/ows", "tmp_directory": "/tmp/", "crs_resolver": "http://localhost:8080/def/", "default_crs": "http://localhost:8080/def/crs/EPSG/0/4326", "mock": false, "automated": true, "subset_correction" : false }, "input": { "coverage_id": "NIR2323" }, "recipe": { "name": "wcs_extract", "options": { "coverage_id": "mean_summerair_temp", "wcs_endpoint" : "http://localhost:8088/rasdaman/ows/wcs", "partitioning_scheme" : [2720, 2361], "tiling": "ALIGNED [0:2000, 0:2000]" } } }
and it returns error
An error has occured in the execution of the program. Error Message: list index out of range Stack Trace: Traceback (most recent call last): File "wcst_import.py", line 126, in main reg.run_recipe(session) File "/home/rasdaman/test_server/ticket_908/rasdaman/applications/wcst_import/master/recipe/recipe_registry.py", line 72, in run_recipe recipe.describe() File "/home/rasdaman/test_server/ticket_908/rasdaman/applications/wcst_import/recipes/wcs_extract/recipe.py", line 82, in describe importer = self._get_importer() File "/home/rasdaman/test_server/ticket_908/rasdaman/applications/wcst_import/recipes/wcs_extract/recipe.py", line 112, in _get_importer self.importer = Importer(self._get_coverage(), self.options['wms_import']) File "/home/rasdaman/test_server/ticket_908/rasdaman/applications/wcst_import/recipes/wcs_extract/recipe.py", line 105, in _get_coverage self.options['partitioning_scheme']).get_coverage() File "/home/rasdaman/test_server/ticket_908/rasdaman/applications/wcst_import/util/coverage_reader.py", line 62, in __init__ self._read() File "/home/rasdaman/test_server/ticket_908/rasdaman/applications/wcst_import/util/coverage_reader.py", line 385, in _read crs = self._get_crs(root).replace("localhost:9090", "localhost:8080") File "/home/rasdaman/test_server/ticket_908/rasdaman/applications/wcst_import/util/coverage_reader.py", line 80, in _get_crs crs = root.xpath("//gml:Envelope/@srsName", namespaces=self._get_ns())[0].strip() IndexError: list index out of range
Attachments (1)
Change History (9)
comment:1 by , 9 years ago
Milestone: | 9.2 → 10.0 |
---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Yes, I've attached it in here http://rasdaman.org/attachment/ticket/1199/mean_summer_airtemp.xml but I think it is another problem as this is imported by system_test.
comment:4 by , 9 years ago
Very weird, I don't see how that xpath could fail with that coverage, I will check in more detail at one point, thanks for reporting
comment:5 by , 9 years ago
I've tested it and I think the problem is as you suggested (almost right) from wcs_endpoint. There is 2 cases of these problem:
+ If wcs_endpoint does not exist, example: http://localhost:8088/rasdaman/ows (my local is http://localhost:8088/petascope/ows )
+ If wcs_endpoint does exist but coverage_id does not exist: mean_summerair_temp (instead of mean_summer_airtemp).
So need to check wcs_endpoint first and then check coverage_id does exist. I can do it if you think it is not difficult. Thanks.
comment:6 by , 9 years ago
Priority: | major → minor |
---|
Ok, glad to confirm that this throws an error only when the input is wrong. We indeed need to provide the user with a better message but not critical right now. I've set priority to minor, maybe we can do it when there's a bit more time.
comment:7 by , 9 years ago
Alex, it has been done in code review and wait for you and Vlad. I'm reading ticket 1188 (test WCPS 2.0 requirement and doing it now), Thanks.
comment:8 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
the patch was accepted, close here, thanks.
It seems the coverage does not have a CRS somehow. Could you attach the DescribeCoverage oputput? http://localhost:8088/rasdaman/ows/wcs?service=WCS&version=2.0.1&coverageId=mean_summerair_temp