I am looking at the code related to storing image in LIMS, and I am wondering if it is supposed to return an image ID back?
This returns nothing, according to the type hint:
|
@abc.abstractmethod |
|
def store_image(self, image_dict: dict) -> None: |
|
""" |
|
Stores (image parameters) <image_dict> |
|
|
|
Args: |
|
image_dict: A dictionary with image pramaters. |
|
""" |
|
raise Exception("Abstract class. Not implemented") |
...but this expects something:
|
image_id = HWR.beamline.lims.store_image(lims_image) |
|
return image_id |
This returns something, only if all goes well, otherwise nothing:
|
image_id = self._collection.service.storeOrUpdateImage(image_dict) |
|
logging.getLogger("HWR").debug( |
|
" - storing image in lims ok. id : %s" % image_id |
|
) |
|
return image_id |
|
except WebFault: |
|
logging.getLogger("ispyb_client").exception( |
|
"ISPyBClient: exception in store_image" |
|
) |
|
except URLError as e: |
|
logging.getLogger("ispyb_client").exception(e) |
|
else: |
|
logging.getLogger("ispyb_client").error( |
|
"Error in store_image: " |
|
+ "data_collection_id missing, could not store image in ISPyB" |
|
) |
|
else: |
|
logging.getLogger("ispyb_client").exception( |
|
"Error in store_image: could not connect to server" |
|
) |
...but this always returns nothing:
|
def store_image(self, image_dict): |
|
self.adapter.store_image(image_dict) |
I am looking at the code related to storing image in LIMS, and I am wondering if it is supposed to return an image ID back?
This returns nothing, according to the type hint:
mxcubecore/mxcubecore/HardwareObjects/abstract/AbstractLims.py
Lines 222 to 230 in a72b7ae
...but this expects something:
mxcubecore/mxcubecore/HardwareObjects/abstract/AbstractCollect.py
Lines 723 to 724 in a72b7ae
This returns something, only if all goes well, otherwise nothing:
mxcubecore/mxcubecore/HardwareObjects/abstract/ISPyBDataAdapter.py
Lines 389 to 408 in a72b7ae
...but this always returns nothing:
mxcubecore/mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py
Lines 171 to 172 in a72b7ae