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

STRDSInfoModel: missing band_reference and band_reference for image collections #41

Closed
neteler opened this issue Nov 28, 2019 · 2 comments
Assignees
Labels

Comments

@neteler
Copy link
Member

neteler commented Nov 28, 2019

At time the image collection endpoint (https://openeo.mundialis.de/collections) gives the following error:

'  "message": "The model \\"STRDSInfoModel\\" does not have an attribute \\"number_of_bands\\"", \n'

openeo-grassgis-driver test log captured:

----------------------------- Captured stdout call -----------------------------
('{\n'
 '  "accept_datetime": "2019-11-28 13:05:36.207693", \n'
 '  "accept_timestamp": 1574946336.2076917, \n'
 '  "api_info": {\n'
 '    "endpoint": "strdsmanagementresource", \n'
 '    "method": "GET", \n'
 '    "path": '
 '"/api/v1/locations/latlong_wgs84/mapsets/modis_ndvi_global/strds/ndvi_16_5600m", \n'
 '    "request_url": '
 '"http://actinia.mundialis.de/api/v1/locations/latlong_wgs84/mapsets/modis_ndvi_global/strds/ndvi_16_5600m"\n'
 '  }, \n'
 '  "datetime": "2019-11-28 13:05:36.906189", \n'
 '  "exception": {\n'
 '    "message": "The model \\"STRDSInfoModel\\" does not have an attribute '
 '\\"number_of_bands\\"", \n'
 '    "traceback": [\n'
 '      "  File '
 '\\"/usr/local/lib/python3.6/dist-packages/actinia_core-0.99.1.post0.dev22+geb8bca3-py3.6.egg/actinia_core/resources/ephemeral_processing.py\\", '
 'line 1350, in run\\n    self._execute()\\n", \n'
 '      "  File '
 '\\"/usr/local/lib/python3.6/dist-packages/actinia_core-0.99.1.post0.dev22+geb8bca3-py3.6.egg/actinia_core/resources/strds_management.py\\", '
 'line 594, in _execute\\n    self.module_results = '
 'STRDSInfoModel(**strds)\\n", \n'
 '      "  File '
 '\\"/usr/local/lib/python3.6/dist-packages/flask_restful_swagger_2/__init__.py\\", '
 'line 337, in __init__\\n    \'The model \\"{0}\\" does not have an attribute '
 '\\"{1}\\"\'.format(self.__class__.__name__, k))\\n"\n'
 '    ], \n'
 '    "type": "<class \'ValueError\'>"\n'
 '  }, \n'
 '  "http_code": 400, \n'
 '  "message": "The model \\"STRDSInfoModel\\" does not have an attribute '
 '\\"number_of_bands\\"", \n'
 '  "process_chain_list": [\n'
 '    {\n'
 '      "1": {\n'
 '        "flags": "g", \n'
 '        "inputs": {\n'
 '          "input": "ndvi_16_5600m", \n'
 '          "type": "strds"\n'
 '        }, \n'
 '        "module": "t.info"\n'
 '      }\n'
 '    }\n'
 '  ], \n'
 '  "process_log": [\n'
 '    {\n'
 '      "executable": "t.info", \n'
 '      "parameter": [\n'
 '        "type=strds", \n'
 '        "input=ndvi_16_5600m", \n'
 '        "-g"\n'
 '      ], \n'
 '      "return_code": 0, \n'
 '      "run_time": 0.6452951431274414, \n'
 '      "stderr": [\n'
 '        ""\n'
 '      ], \n'
 '      "stdout": '
 '"id=ndvi_16_5600m@modis_ndvi_global\\nname=ndvi_16_5600m\\nmapset=modis_ndvi_global\\ncreator=mundialis\\ntemporal_type=absolute\\ncreation_time=\'2017-02-16 '
 "11:31:50.189306'\\nmodification_time='2017-05-29 "
 "21:04:13.222786'\\nsemantic_type=mean\\nstart_time='2013-01-01 "
 "00:00:00'\\nend_time='2017-05-25 00:00:00'\\ngranularity='16 "
 'days\'\\nmap_time=interval\\nnorth=90.0\\nsouth=-90.0\\neast=180.0\\nwest=-180.0\\ntop=0.0\\nbottom=0.0\\naggregation_type=None\\nnumber_of_bands=None\\nnumber_of_maps=101\\nnsres_min=0.05\\nnsres_max=0.05\\newres_min=0.05\\newres_max=0.05\\nmin_min=-2000.0\\nmin_max=-2000.0\\nmax_min=9947.0\\nmax_max=9994.0\\nraster_register=raster_map_register_73eb5d056c51424288153b87a714630a\\n"\n'
 '    }\n'
 '  ], \n'
 '  "progress": {\n'
 '    "num_of_steps": 1, \n'
 '    "step": 1\n'
 '  }, \n'
 '  "resource_id": "resource_id-21b3cb05-ef05-4780-87ea-cc62ed86fb5a", \n'
 '  "status": "error", \n'
 '  "time_delta": 0.6985125541687012, \n'
 '  "timestamp": 1574946336.9061809, \n'
 '  "urls": {\n'
 '    "resources": [], \n'
 '    "status": '
 '"http://actinia.mundialis.de/api/v1/resources/openeo/resource_id-21b3cb05-ef05-4780-87ea-cc62ed86fb5a"\n'
 '  }, \n'
 '  "user_id": "openeo"\n'
 '}\n')
________________________ DataTestCase.test_collections _________________________

self = <test_collections.DataTestCase testMethod=test_collections>

    def test_collections(self):
        """Test the return of raster and vector maps in the north carolina test dataset
    
        :return:
        """
        response = self.app.get('/collections', headers=self.auth)
        data = json.loads(response.data.decode())
    
        pprint(data)
    
        dsets = ["nc_spm_08.landsat.raster.lsat5_1987_10",
                 "nc_spm_08.PERMANENT.vector.lakes",
                 "nc_spm_08.PERMANENT.raster.elevation"]
    
        data_id_list = []
    
>       for entry in data["collections"]:
E       TypeError: list indices must be integers or slices, not str

tests/test_collections.py:32: TypeError
----------------------------- Captured stdout call -----------------------------
[{'description': 'An internal error occurred while catching strds layers!'},
 400]
@neteler
Copy link
Member Author

neteler commented Nov 29, 2019

After upgrade of actinia.mundialis.de and redeployment, the remaining error seems to be:

https://actinia.mundialis.de/api/v1/locations/nc_spm_08/mapsets/new_user_mapset/raster_layers

accept_datetime | "2019-11-29 17:02:32.028010"
accept_timestamp | 1575046952.0280094
api_info |  
endpoint | "rasterlayersresource"
method | "GET"
path | "/api/v1/locations/nc_spm_08/mapsets/new_user_mapset/raster_layers"
request_url | "http://actinia.mundialis.de/api/v1/locations/nc_spm_08/mapsets/new_user_mapset/raster_layers"
datetime | "2019-11-29 17:02:32.036806"
exception |  
message | "AsyncProcessError:  Unable to create a temporary GIS database, Exception: AsyncProcessError:  Unable to link all required mapsets into temporary location. Missing or un-accessible mapset <new_user_mapset> in location <nc_spm_08>"
traceback |  
0 | "  File \"/usr/local/lib/python3.6/dist-packages/actinia_core-0.99.2.post0.dev1+ga0909db-py3.6.egg/actinia_core/resources/ephemeral_processing.py\", line 1350, in run\n    self._execute()\n"
1 | "  File \"/usr/local/lib/python3.6/dist-packages/actinia_core-0.99.2.post0.dev1+ga0909db-py3.6.egg/actinia_core/resources/map_layer_management.py\", line 502, in _execute\n    self._create_temp_database(self.required_mapsets)\n"
2 | "  File \"/usr/local/lib/python3.6/dist-packages/actinia_core-0.99.2.post0.dev1+ga0909db-py3.6.egg/actinia_core/resources/ephemeral_processing.py\", line 754, in _create_temp_database\n    \", Exception: %s\" % str(e))\n"
type | "<class 'actinia_core.resources.common.exceptions.AsyncProcessError'>"
http_code | 400
message | "AsyncProcessError:  Unable to create a temporary GIS database, Exception: AsyncProcessError:  Unable to link all required mapsets into temporary location. Missing or un-accessible mapset <new_user_mapset> in location <nc_spm_08>"
process_chain_list |  

@neteler neteler assigned huhabla and metzm and unassigned neteler Nov 29, 2019
@neteler neteler added the bug label Nov 29, 2019
@neteler
Copy link
Member Author

neteler commented Dec 3, 2019

Some garbarge mapsets names "testmapset" and "new_user_mapset" have been removed from the backend, now the image collection endpoint (https://openeo.mundialis.de/collections) is back.

@neteler neteler closed this as completed Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants