【发布时间】:2018-06-12 02:49:09
【问题描述】:
我是 Evernote python 2.x API 的新手,我正在研究一些示例。我设法在沙盒中创建了一个便笺,但未能创建带有附件的便笺。我按照https://dev.evernote.com/doc/articles/creating_notes.php 中给出的示例代码,我最终调用了
try:
note = noteStore.createNote(authToken, ourNote)
except Errors.EDAMUserException, edue:
## Something was wrong with the note data
## See EDAMErrorCode enumeration for error code explanation
## http://dev.evernote.com/documentation/reference/Errors.html#Enum_EDAMErrorCode
print "EDAMUserException:", edue
return None
ourNote 的参数打印为
Note(contentHash=None, updated=None, created=None, deleted=None, contentLength=None, title='testtitel2', notebookGuid=None, content='<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note>testbody<br /><br />Attachment with hash 3430623163666630303562663662393263386539663366613134636630323736: <br /><en-media type="text/plain" hash="3430623163666630303562663662393263386539663366613134636630323736" /><br /></en-note>', tagNames=None, updateSequenceNum=None, tagGuids=None, active=None, attributes=None, guid=None, resources=[Resource(noteGuid=None, height=None, width=None, alternateData=None, mime='text/plain', updateSequenceNum=None, duration=None, attributes=ResourceAttributes(recoType=None, sourceURL=None, cameraMake=None, timestamp=None, altitude=None, clientWillIndex=None, longitude=None, fileName=None, attachment=None, latitude=None, applicationData=None, cameraModel=None), guid=None, data=Data(body='This is the content of testfile, aaa, bbb\\n\n', bodyHash='40b1cff005bf6b92c8e9f3fa14cf0276', size=44), active=None, recognition=None)])
我来了
EDAMUserException: EDAMUserException(errorCode=5, parameter='[3430623163666630303562663662393263386539663366613134636630323736]')
上面写着DATA_REQUIRED。究竟有什么问题或遗漏?
【问题讨论】: