The usage seems to be fine. The errorCode=2 means the format of the contentClass is wrong.
The regex it has to follow is here.
سؤال
I am trying to make notes in a notebook read only by using the contentClass attribute.
My code is below:
I can set other attributes, but as soon as I try and set the contentClass, it throws an EDAM exception on create note. (Company and app name has been changed)
attrib = Types.NoteAttributes()
attrib.sourceApplication = 'Company_evernoteApp'
attrib.source = 'Company'
attrib.contentClass = 'Company.App'
new_note.attributes = attrib
This is throwing the error:
evernote.edam.error.ttypes.EDAMUserException: EDAMUserException(errorCode=2, parameter='NoteAttributes.contentClass')
later on in the code when I try and call:
new_note = note_store.createNote(new_note)
Am I using contentClass right?
المحلول
The usage seems to be fine. The errorCode=2 means the format of the contentClass is wrong.
The regex it has to follow is here.