- **summary**: error when create IMM object using Ccb pyosaf API --> pyosaf: 
error when create IMM object using Ccb pyosaf API



---

**[tickets:#3338] pyosaf: error when create IMM object using Ccb pyosaf API**

**Status:** accepted
**Milestone:** 5.23.07
**Created:** Wed May 17, 2023 07:41 AM UTC by Nguyen Quoc Khanh
**Last Updated:** Wed May 17, 2023 07:41 AM UTC
**Owner:** Nguyen Quoc Khanh


When I create an IMM object whose type in the xml file is SA_UINT32_T by using 
the Ccb API but the value input of the method "setattr()" is a string, an error 
will occur at the create() method.
~~~
Traceback (most recent call last):
  File "opensaf-code/python/samples/ping-pong", line 78, in <module>
    ccb.create(obj=obj)
  File "/usr/local/lib/python3.6/dist-packages/pyosaf/utils/immom/ccb.py", line 
189, in create
    attr.attrValues = marshal_c_array(attr.attrValueType, values)
  File "/usr/local/lib/python3.6/dist-packages/pyosaf/utils/immom/ccb.py", line 
93, in marshal_c_array
    c_array[i] = _value_to_ctype_ptr(value_type, value)
  File "/usr/local/lib/python3.6/dist-packages/pyosaf/utils/immom/ccb.py", line 
49, in _value_to_ctype_ptr
    ctypeptr = cast(pointer(SaUint32T(value)), c_void_p)
TypeError: an integer is required (got type str)
~~~


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to