Hi,
I am trying to implement the Storage()
functionality. I have written a test function:
def test(params, **kwargs):
storage = Storage()
for i in range(10):
storage.set(f'{i}', data=File.from_data(f'{i}'), scope='entity')
for i in range(10):
print(storage.get(f'{i}', scope='entity'))
Storage().list(scope='entity')
return ViktorResult(set_params_result=SetParamsResult({}))
The .set
and .get
functions of Storage()
works fine, but the .list
function gives the following error msg:
2022-06-28 13:13:07.372 ERROR : Exception is raised
Traceback (most recent call last):
File "viktor_connector/connector.pyx", line 400, in connector.Job.execute
File "viktor/core.pyx", line 1715, in viktor.core._handle_job
File "/usr/src/app/app/XXXXX/controller.py", line 155, in test
Storage().list(scope='entity')
File "viktor/core.pyx", line 1169, in viktor.core._validate_storage_scope.wrapper
File "viktor/core.pyx", line 1343, in viktor.core.Storage.list
viktor.errors.InternalError
Is there something wrong in adressing the Storage()
?