Dear all,
in my ongoing quest to get familiar with openBIS, I’ve entered a range of measurements, each measrement is associated with the corresponding sample and the preparation method as parents - all entered via the ELN in the webbrowser.
This shows up in the webbrowser and I can, e.g. click on a parent and get to that object (see screenshot below)
Now I want to make a plot in python, I can get the object and the measured value shows up as well - but the parent relation is empty?
The permID fits, so it should be the same object…
print(objects[0].attrs.all)
<bound method AttrHolder.all of attribute value
------------------- -------------------------------------------------------------
code MEASURE_POINT98
permId 20230328174747567-154
identifier /ULRICHKERZEL/MG_ALLOY_ANALYSIS/MEASURE_POINT98
type POINT_MEASUREMENT
project /ULRICHKERZEL/MG_ALLOY_ANALYSIS
parents
children
components []
space ULRICHKERZEL
experiment /ULRICHKERZEL/MG_ALLOY_ANALYSIS/MG_ALLOY_ANALYSIS_VOLFRACTION
tags []
registrator ulrichkerzel
registrationDate 2023-03-28 17:47:48
modifier ulrichkerzel
modificationDate 2023-03-30 12:23:36
container
frozen False
frozenForComponents False
frozenForChildren False
frozenForParents False
frozenForDataSets False>
When I do try to access the parents anyway, I get an exception:
print(objects[0].get_parents())
AttributeError Traceback (most recent call last)
Cell In[49], line 1
----> 1 print(objects[0].get_parents())
File ~/.cache/pypoetry/virtualenvs/openbis-qARisZC2-py3.10/lib/python3.10/site-packages/pybis/attribute.py:736, in AttrHolder.get_parents(self, **kwargs)
732 def get_parents(self, **kwargs):
733 """get the current parents and return them as a list (Things/DataFrame)
734 or return empty list
735 """
--> 736 return getattr(self._openbis, "get_" + self._entity.lower())(
737 self.parents, **kwargs
738 )
File ~/.cache/pypoetry/virtualenvs/openbis-qARisZC2-py3.10/lib/python3.10/site-packages/pybis/pybis.py:4648, in Openbis.get_sample(self, sample_ident, only_data, withAttachments, props, **kvals)
4646 identifiers.append(_type_for_id(ident, "sample"))
4647 else:
-> 4648 identifiers.append(_type_for_id(sample_ident, "sample"))
4650 fetchopts = get_fetchoption_for_entity("sample")
4651 options = [
4652 "tags",
4653 "properties",
(...)
4659 "dataSets",
4660 ]
...
225 }
226 """
227 # Tags have strange permIds...
AttributeError: 'NoneType' object has no attribute 'strip'
Any ideas what I might do wrong?
Many thanks in advance
best wishes
Ulrich