AnsweredAssumed Answered

Problems when updating metadata properties via cmislib

Question asked by cesarista on Mar 31, 2017
Latest reply on Apr 1, 2017 by cesarista


Have you tried to update properties via CMIS after a repo.query with python cmislib ? 
I created a little script that searchs for two documents (kk.txt and kk3.txt) and tries to set / update a property on it.


It seems that someDoc.updateProperties(props) should work, where props are the proper dictionary for the properties. But I don't see what's wrong in the second case.



# This part works
docu = repo.getObjectByPath('/Test/kk.txt')
print docu
props = {'cmis:name': 'kk2.txt'}


# This results in error
results = repo.query("SELECT * FROM cmis:document where cmis:name = 'kk3.txt' ")
someDoc = results[0]
print someDoc
props = {'cmis:name': 'kk4.txt'}


File "", line 35, in <module>
File "/usr/lib/python2.6/site-packages/cmislib_alfresco_extension-0.3.2-py2.6.egg/cmislibalf/", line 185, in updateProperties
selfUrl = self._getSelfLink()
File "/usr/lib/python2.6/site-packages/cmislib-0.5.1-py2.6.egg/cmislib/", line 2169, in _getSelfLink
assert len(url) > 0, "Could not determine the self link."
TypeError: object of type 'NoneType' has no len()

I see no problems on permissions or allowable actions. Did I miss something ?

I use cmis 0.5.1 library with Alfresco 4.2.6 EE and CMIS 1.1 endpoint