最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Evernote同步出错:Exception has occurred AttributeError Store object has no attribute syncNote

Evernote crifan 428浏览 0评论
折腾:
【未解决】用Python发布印象笔记帖子内容到WordPress网站
期间,之前的代码:
updatedNote = self.noteStore.syncNote(newNote)
报错:
Exception has occurred: AttributeError
'Store' object has no attribute 'syncNote'
需要去搞清楚原因
记得之前代码是没问题的
Evernote noteStore syncNote
Thrift module: NoteStore
和sync相关的:
真的没有syncNote

只有:
  • * getFilteredSyncChunk
  • * getLinkedNotebookSyncChunk
  • * getLinkedNotebookSyncState
  • SyncChunk
  • SyncChunkFilter
  • SyncState
  • * getSyncState
Core Concepts – Evernote Developers
Searching Notes – Evernote Developers
好像是:

搜代码中
.updateNote
找到:
是有的
libs/evernote-sdk-python3/lib/evernote/edam/notestore/NoteStore.py
  def process_updateNote(self, seqid, iprot, oprot):
    args = updateNote_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateNote_result()
    try:
      result.success = self._handler.updateNote(args.authenticationToken, args.note)
libs/evernote-sdk-python3/lib/evernote/edam/notestore/NoteStore-remote
elif cmd == 'updateNote':
  if len(args) != 2:
    print 'updateNote requires 2 args'
    sys.exit(1)
  pp.pprint(client.updateNote(args[0],eval(args[1]),))
去改为:
updatedNote = self.noteStore.updateNote(newNote)
结果:
可以调用 更新 成功
返回 部分字段
比如 content是空
即可。
【总结】
此处,对于Evernote的api来说,想要更新信息
此处传入的是guid,title
待更新的是:content,resources,attributes
则调用的接口是:
Thrift module: NoteStore
  • Function: NoteStore.updateNote
    • Types.Note updateNote(string authenticationToken, Types.Note note) throws Errors.EDAMUserException, Errors.EDAMSystemException, Errors.EDAMNotFoundException
Function: NoteStore.updateNote
Types.Note updateNote(string authenticationToken,
                      Types.Note note)
    throws Errors.EDAMUserException, Errors.EDAMSystemException, Errors.EDAMNotFoundException

Submit a set of changes to a note to the service. The provided data must include the note's guid field for identification. The note's title must also be set.
@param  note A Note object containing the desired fields to be populated on the service. With the exception of the note's title and guid, fields that are not being changed do not need to be set. If the content is not being modified, note.content should be left unset. If the list of resources is not being modified, note.resources should be left unset.
@return The metadata (no contents) for the Note on the server after the update. The Note.sharedNotes field will not be set.
@throws  EDAMUserException
* BAD_DATA_FORMAT "Note.title" - invalid length or pattern
* BAD_DATA_FORMAT "Note.content" - invalid length for ENML body
* BAD_DATA_FORMAT "NoteAttributes.*" - bad resource string
* BAD_DATA_FORMAT "ResourceAttributes.*" - bad resource string
* BAD_DATA_FORMAT "Resource.mime" - invalid resource MIME type
* DATA_CONFLICT "Note.deleted" - deleted time set on active note
* DATA_REQUIRED "Resource.data" - resource data body missing
* ENML_VALIDATION "*" - note content doesn't validate against DTD
* LIMIT_REACHED "Note.tagGuids" - too many Tags on Note
* LIMIT_REACHED "Note.resources" - too many resources on Note
* LIMIT_REACHED "Note.size" - total note size too large
* LIMIT_REACHED "Resource.data.size" - resource too large
* LIMIT_REACHED "NoteAttribute.*" - attribute string too long
* LIMIT_REACHED "ResourceAttribute.*" - attribute string too long
* PERMISSION_DENIED "Note.notebookGuid" - user doesn't own destination
* PERMISSION_DENIED "Note.tags" - user doesn't have permission to modify the note's tags. note.tags must be unset.
* PERMISSION_DENIED "Note.attributes" - user doesn't have permission to modify the note's attributes. note.attributes must be unset.
* QUOTA_REACHED "Accounting.uploadLimit" - note exceeds upload quota
* BAD_DATA_FORMAT "Tag.name" - Note.tagNames was provided, and one of the specified tags had an invalid length or pattern
* LIMIT_REACHED "Tag" - Note.tagNames was provided, and the required new tags would exceed the maximum number per account
@throws  EDAMNotFoundException
* "Note.guid" - note not found, by GUID
* "Note.notebookGuid" - if notebookGuid provided, but not found
即可。

转载请注明:在路上 » 【已解决】Evernote同步出错:Exception has occurred AttributeError Store object has no attribute syncNote

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
92 queries in 0.183 seconds, using 23.32MB memory