Open ninsbl opened 1 year ago
@ninsbl Please try the endpoint /api/v3/locations/ETRS_33N/processing_async
for ephemeral processing.
Is there a simple typo somewhere? timesreies_zones_univar
-> timeseries_zones_univar
, see above "message"
Is there a simple typo somewhere?
timesreies_zones_univar
->timeseries_zones_univar
, see above "message"
Yes, well spotted. The typo should not affect the issue at hand, however...
I now tried the /api/v3/locations/ETRS_33N/processing_async
endpoint, and in order to make the issue more easy to reproduce I used the example template:
{
"id": "user_default_value",
"description": "test default value in actinia-module-plugin",
"template": {
"version": "1",
"list": [
{
"module": "r.mapcalc",
"id": "r.mapcalc_test",
"inputs": [
{
"param": "expression",
"comment": "output = r.mapcalc result, string; value = raster value (default=0.428), float",
"value": "{{ output }} = {{ value|default(0.428) }}"
}
]
},
{
"id": "r_info",
"module": "r.info",
"inputs": [
{
"param": "map",
"value": "{{ output }}"
}
]
}
]
}
}
And then the following JSON payload:
{
"version": "1",
"list": [
{
"module": "user_default_value",
"id": "r.mapcalc_test",
"inputs": [
{
"param": "output",
"value": "mod_test2"
}
]
}
]
}
With that /api/v3/locations/ETRS_33N/processing_async
endpoint throws an error:
{
"accept_datetime": "2023-08-31 13:03:46.721964",
"accept_timestamp": 1693487026.7219613,
"api_info": {
"endpoint": "asyncephemeralresource",
"method": "POST",
"path": "/api/v3/locations/ETRS_33N/processing_async",
"request_url": "http://my-actinia/api/v3/locations/ETRS_33N/processing_async"
},
"datetime": "2023-08-31 13:03:47.233112",
"exception": {
"message": "GrassInitError: GRASS module user_default_value not found in ['/usr/local/grass/bin/user_default_value', '/usr/local/grass/scripts/user_default_value', '/root/.grass8/addons/bin/user_default_value', '/root/.grass8/addons/scripts/user_default_value']",
"traceback": [
" File \"/usr/lib/python3.11/site-packages/actinia_core/processing/actinia_processing/ephemeral_processing.py\", line 1943, in run\n self._execute()\n",
" File \"/usr/lib/python3.11/site-packages/actinia_core/processing/actinia_processing/ephemeral_processing.py\", line 1702, in _execute\n self._execute_process_list(process_list=process_list)\n",
" File \"/usr/lib/python3.11/site-packages/actinia_core/processing/actinia_processing/ephemeral_processing.py\", line 1887, in _execute_process_list\n self._run_module(process)\n",
" File \"/usr/lib/python3.11/site-packages/actinia_core/processing/actinia_processing/ephemeral_processing.py\", line 1487, in _run_module\n return self._run_executable(process, poll_time)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/usr/lib/python3.11/site-packages/actinia_core/processing/actinia_processing/ephemeral_processing.py\", line 1539, in _run_executable\n proc = self.ginit.run_module(\n ^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/usr/lib/python3.11/site-packages/actinia_core/core/grass_init.py\", line 566, in run_module\n return self.runner.run_module(\n ^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/usr/lib/python3.11/site-packages/actinia_core/core/grass_init.py\", line 445, in run_module\n grass_module_path = self._create_grass_module_path(grass_module)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/usr/lib/python3.11/site-packages/actinia_core/core/grass_init.py\", line 396, in _create_grass_module_path\n raise GrassInitError(\n"
],
"type": "<class 'actinia_core.core.grass_init.GrassInitError'>"
},
"http_code": 400,
"message": "GrassInitError: GRASS module user_default_value not found in ['/usr/local/grass/bin/user_default_value', '/usr/local/grass/scripts/user_default_value', '/root/.grass8/addons/bin/user_default_value', '/root/.grass8/addons/scripts/user_default_value']",
While the /api/v3/locations/ETRS_33N/mapsets/tmp_mapset/processing
endpoint succeeds...
Currently, it seems the module plugin only supports persistent processing. THis is the error I get when I try to execute a module template as
processing_async_export
:The same call works fine with just
processing
.Idally, the module-plugin should support all processing types in actinia. Alternatively, limitations should be documented more prominently (I may just have overlooked)...