2013-07-03 135 views
0

我想通过使用contentClass属性在笔记本中只读笔记。Evernote使用contentClass只读笔记

我的代码如下:

我可以设置其他属性,但只要我尝试设置内容类,它抛出上创建笔记的EDAM例外。 (公司与应用程序的名称已更改)

attrib = Types.NoteAttributes() 
attrib.sourceApplication = 'Company_evernoteApp' 
attrib.source = 'Company' 
attrib.contentClass = 'Company.App' 
new_note.attributes = attrib 

这是引发错误:后来

evernote.edam.error.ttypes.EDAMUserException: EDAMUserException(errorCode=2, parameter='NoteAttributes.contentClass') 

的代码时,我尝试拨打:

new_note = note_store.createNote(new_note) 

我使用contentClass对不对?

回答

1

用法似乎很好。 errorCode = 2表示contentClass的格式错误。

它必须遵循的正则表达式是here

+0

是的,我的格式已关闭。谢谢! – tknickman

相关问题