cnr-ibf-pa / hbp-bsp-issues

Ticketing system for developers/testers and power users of the Brain Simulation Platform of the Human Brain Project
4 stars 0 forks source link

Code error 'StorageNotFoundException: The entity is not found' for Synaptic Events Fitting #546

Closed alex4200 closed 4 years ago

alex4200 commented 4 years ago

Expected behavior

No error

Actual Behavior (please include screenshot if possible)

---------------------------------------------------------------------------
StorageNotFoundException                  Traceback (most recent call last)
<ipython-input-10-e9b8d4fcd86d> in check_job_on_service_account(CheckSNSG)
    907                     clients.storage.mkdir(storeto_path)
    908                 storeto = str(os.path.join(storeto_path,TT.value+'_fitting_'+                                           parser.parse(job_submissiontime).                                           astimezone(pytz.timezone('CET')).                                           strftime("%d/%m/%Y %H:%M:%S")))
--> 909                 clients.storage.mkdir(storeto)
    910                 for f in file_list:
    911                     filename = f['filename']

/opt/conda/lib/python3.6/site-packages/hbp_service_client/storage_service/client.py in mkdir(self, path)
    182 
    183         self.__validate_storage_path(path, projects_allowed=False)
--> 184         parent_metadata = self.get_parent(path)
    185         self.api_client.create_folder(path.split('/')[-1], parent_metadata['uuid'])
    186         # no return necessary, function succeeds or we would have thrown an exception

/opt/conda/lib/python3.6/site-packages/hbp_service_client/storage_service/client.py in get_parent(self, path)
    163         del path_steps[-1]
    164         parent_path = '/{0}'.format('/'.join(path_steps))
--> 165         return self.api_client.get_entity_by_query(path=parent_path)
    166 
    167     def mkdir(self, path):

/opt/conda/lib/python3.6/site-packages/hbp_service_client/storage_service/api.py in get_entity_by_query(self, uuid, path, metadata)
    221         return self._authenticated_request \
    222             .to_endpoint('entity/') \
--> 223             .with_params(params) \
    224             .return_body() \
    225             .get()

/opt/conda/lib/python3.6/site-packages/hbp_service_client/request/request_builder.py in get(self)
    211             Any exception parametrized with the `throw` method
    212         '''
--> 213         return self.__send('GET')
    214 
    215     def post(self):

/opt/conda/lib/python3.6/site-packages/hbp_service_client/request/request_builder.py in __send(self, method)
    258         )
    259 
--> 260         self.__throw_if_necessary(response, self._throws)
    261 
    262         if self._return_body:

/opt/conda/lib/python3.6/site-packages/hbp_service_client/request/request_builder.py in __throw_if_necessary(response, throws)
    270             args = should_throw(response)
    271             if args is not None:
--> 272                 raise exception_class(args)
    273 
    274     @staticmethod

StorageNotFoundException: The entity is not found

Steps to reproduce the problem

For the DEV version of the use case 'Synaptic events fitting':

  1. Reset the container
  2. Run the notebook; there is one reload/restart expected
  3. Run the notebook -> GUI is created
  4. Select the first experimental data file
  5. Start DEMO run on Service Account - NSG
  6. Wait until job is completed (press 'Check NSG simulation')

When job is completed, the error appears.

Optional infrastructural data (user, platform, browser, environment, ...)

DEV use case Collab used: B0070

clupascu commented 4 years ago

@alex4200 This issue should be fixed now. I fixed folder names in order to not get "entity not found" anymore. Can you please test again? Thanks.

alex4200 commented 4 years ago

Yes seems to be fixed, thanks