Skip to content

Instantly share code, notes, and snippets.

@evernotegists
Created April 4, 2013 20:10
Show Gist options
  • Save evernotegists/5313860 to your computer and use it in GitHub Desktop.
Save evernotegists/5313860 to your computer and use it in GitHub Desktop.
dev_token = "put your dev token here"
client = EvernoteClient(token=dev_token)
userStore = client.get_user_store()
user = userStore.getUser()
print user.username
@eww125
Copy link

eww125 commented Sep 20, 2016

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.

@devsohi
Copy link

devsohi commented Sep 2, 2017

@eww125 I am also getting same error . Any solution ?

@2bon
Copy link

2bon commented Jul 20, 2018

It's really fucking awkward
same cmd = 'python t1.py' , if I ran @

  1. 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'

  1. powerShell,, it returns

PS D:\Users\Rick\IdeaProjects[Evernote + Python ]-sample> python .\t1.py
rickxycn

@fanrongqitiancai
Copy link

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