# PyBIS property types missing object type info

**URL:** <https://community.openbis.ch/t/pybis-property-types-missing-object-type-info/434>\
**Category:** Developments\
**Created:** [20 January 2025 10:48 UTC](https://community.openbis.ch/t/pybis-property-types-missing-object-type-info/434 "2025-01-20T10:48:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JosePizarro3](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@JosePizarro3](https://community.openbis.ch/u/JosePizarro3)\
**Post date:** [20 January 2025 10:48 UTC](https://community.openbis.ch/t/pybis-property-types-missing-object-type-info/434/1 "2025-01-20T10:48:52Z")

</div>

In PyBIS, when using `get_property_types()` and when a propertyType is of dataType OBJECT, the returned df does not contain the information of the specific objectType being used. This information appears in the Admin UI and with the Java API, so I guessed it is a missed field when doing `requests.post()`.

I actually found the error and hacked in my local package installation, `pybis==1.37.0`. Only a few lines have to be added to `pybis/definitions.py`

1. In lines 152 and 153, add `"sampleType"` after `"dataType"`
2. After line 451 add:

```python
        "sampleType": {
            "@type": "as.dto.sample.fetchoptions.SampleTypeFetchOptions"
        },

```

Sorry if this has been fixed already. Is there a repo where I can follow the latest releases of PyBIS and open issues / pull requests? Are you accepting external contributors who help on the PyBIS API? 🙂

Many thanks and all the best,  
Jose

---

<div class="post-metadata">

**Author:** ![JosePizarro3](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@JosePizarro3](https://community.openbis.ch/u/JosePizarro3)\
**Post date:** [20 January 2025 15:33 UTC](https://community.openbis.ch/t/pybis-property-types-missing-object-type-info/434/2 "2025-01-20T15:33:22Z")

</div>

Just want to add that, even with these changes added into my local PyBIS installation, the response sometimes return a dictionary (which is the correct response) and sometimes an integer 142.

No idea why this behavior. Maybe there is something off with the internals of PyBIS I cannot see.

Any help would be appreciated! 🙂

---

<div class="post-metadata">

**Author:** ![alaskowski](https://dub1.discourse-cdn.com/flex013/user_avatar/community.openbis.ch/alaskowski/32/65_2.png) [@alaskowski](https://community.openbis.ch/u/alaskowski)\
**Post date:** [13 February 2025 13:00 UTC](https://community.openbis.ch/t/pybis-property-types-missing-object-type-info/434/3 "2025-02-13T13:00:52Z")

</div>

Object type has been missing in the result of get\_property\_types(). Newest PyBIS version resolves that issue:

[https://pypi.org/project/PyBIS/1.37.1/](https://pypi.org/project/PyBIS/1.37.1/)

Appearing integer (in your case 142) is caused by the deserialization library we are using in PyBIS.

---

<div class="post-metadata">

**Author:** ![JosePizarro3](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@JosePizarro3](https://community.openbis.ch/u/JosePizarro3)\
**Post date:** [15 August 2025 10:38 UTC](https://community.openbis.ch/t/pybis-property-types-missing-object-type-info/434/4 "2025-08-15T10:38:40Z")

</div>

Hi @alaskowski

I am reopening this issue, as it seems I cannot access the vocabulary code associated with an assigned CONTROLLEDVOCABULARY.

I have this code: [bam-masterdata/bam\_masterdata/openbis/get\_entities.py at main · BAMresearch/bam-masterdata · GitHub](https://github.com/BAMresearch/bam-masterdata/blob/main/bam_masterdata/openbis/get_entities.py)

In `def _assign_properties`, if a property is of type vocabulary, there is no response regarding the vocabularyType. I don’t know if this is a problem of my openBIS version (20.10.11.1) or something went off, but I didn’t touch that part of the code in a long time, but now it is broken with the mentioned bug.

I am using `pybis~=1.37.1rc4`

\*\*Editing this to confirm that I cannot retrieve the object code when an assigned property is of type OBJECT either

---

<div class="post-metadata">

**Author:** ![alaskowski](https://dub1.discourse-cdn.com/flex013/user_avatar/community.openbis.ch/alaskowski/32/65_2.png) [@alaskowski](https://community.openbis.ch/u/alaskowski)\
**Post date:** [21 August 2025 12:18 UTC](https://community.openbis.ch/t/pybis-property-types-missing-object-type-info/434/5 "2025-08-21T12:18:25Z")

</div>

Hi @JosePizarro3

Pybis 1.37.4 should fix this issue:

[PyBIS-1.37.4](https://pypi.org/project/pybis/1.37.4/)

Best,

Adam Laskowski
