Created
April 4, 2013 20:10
-
-
Save evernotegists/5313860 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dev_token = "put your dev token here" | |
client = EvernoteClient(token=dev_token) | |
userStore = client.get_user_store() | |
user = userStore.getUser() | |
print user.username |
Correct Laurent, a good work!
When I run this code in a file called test1.py:
from evernote.api.client import EvernoteClient
dev_token = "(my token)"
client = EvernoteClient(token=dev_token)
userStore = client.get_user_store()
user = userStore.getUser()
print user.username
I get this error:
Traceback (most recent call last):
File "test1.py", line 5, in <module>
user = userStore.getUser()
File "build/bdist.macosx-10.11-intel/egg/evernote/api/client.py", line 148, in delegate_method
File "build/bdist.macosx-10.11-intel/egg/evernote/edam/userstore/UserStore.py", line 1033, in getUser
File "build/bdist.macosx-10.11-intel/egg/evernote/edam/userstore/UserStore.py", line 1056, in recv_getUser
evernote.edam.error.ttypes.EDAMUserException: EDAMUserException(errorCode=2, parameter='authenticationToken')
Any ideas on what is causing this?
Thanks.
@eww125 I am also getting same error . Any solution ?
It's really fucking awkward
same cmd = 'python t1.py' , if I ran @
- intellij terminal, it returns
D:\Users\Rick\IdeaProjects[Evernote + Python ]-sample>python t1.py
Traceback (most recent call last):
File "t1.py", line 2, in
from evernote.api.client import EvernoteClient
ModuleNotFoundError: No module named 'evernote'
- powerShell,, it returns
PS D:\Users\Rick\IdeaProjects[Evernote + Python ]-sample> python .\t1.py
rickxycn
how can I get dev_token? I apply on https://dev.yinxiang.com/key.php
I have
Consumer Key:
Consumer Secret:
what is dev_token?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe you could add
at the beginning to make it ready to run ?