Python equivalent of dataLoadContentInstance.readString()

#1

Hi,

I would like to read the failed line logs of a DataLoadProcessLog. In JS, I can do

yy=DataLoadProcessLog.fetch({filter:“id==‘myidstring’”})
a = DataLoadContent.make({id:yy.objs[0].failedContent.id}).readString()

but in python

c3.DataLoadContent.fromString(“91b00012-156c-4b07-b77b-0e3a54c831a3”).readString()

results in

AttributeErrorTraceback (most recent call last)
in ()
----> 1 a=c3.DataLoadContent.fromString(“91b00012-156c-4b07-b77b-0e3a54c831a3”).readString()
AttributeError: C3Object instance has no attribute ‘readString’

0 Likes

#2

I’m not familiar with c3 python, but my guess is that you need to call readString as a static method:

a = c3.DataLoadContent.fromString("91b00012-156c-4b07-b77b-0e3a54c831a3")
b = c3.DataLoadContent.readString(a)
1 Like

#3

Yes member functions are not supported in python type system at the moment.

0 Likes

#4

Matt’s answer is working. Thanks

0 Likes