Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmail Accounts in Languages other than English #28

Open
sveitser opened this issue Oct 14, 2012 · 3 comments
Open

Gmail Accounts in Languages other than English #28

sveitser opened this issue Oct 14, 2012 · 3 comments
Assignees

Comments

@sveitser
Copy link
Member

I just let someone test it who has his gmail account set up in French. In this case the query won't work as the tags are in French. So imap_conn.select('[Gmail]/Sent Mail') raises an error:

Authenticating against GMail IMAP servers
Getting user profile data and email address
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/bottle.py", line 744, in _handle
    return route.call(**args)
  File "/usr/lib/python2.7/site-packages/bottle.py", line 1479, in wrapper
    rv = callback(*a, **ka)
  File "vocably.py", line 45, in fetch_mail
    email_text = oauth.fetch_mail()
  File "/home/lulu/dev/vocably/utils/vocably_oauth.py", line 48, in fetch_mail
    resp, data = imap_conn.search(None, 'ALL')
  File "/usr/lib/python2.7/imaplib.py", line 627, in search
    typ, dat = self._simple_command(name, *criteria)
  File "/usr/lib/python2.7/imaplib.py", line 1070, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/usr/lib/python2.7/imaplib.py", line 825, in _command
    ', '.join(Commands[name])))
error: command SEARCH illegal in state AUTH, only allowed in states SELECTED
localhost.localdomain - - [15/Oct/2012 00:20:52] "GET /emails HTTP/1.1" 500 747

I imagine this could be quite tricky to solve in general but rather important as our app is also interesting for people learning English as a second language.

@ghost ghost assigned hube Oct 14, 2012
@hube
Copy link
Member

hube commented Oct 14, 2012

The error text suggests that authentication didn't succeed?

error: command SEARCH illegal in state AUTH, only allowed in states SELECTED

@sveitser
Copy link
Member Author

Flatmate went to bed so can't do any more tests with his account right now. Given that his inbox looks totally different in term of tags I was thinking this is likely to be the issue. Will try again tomorrow if possible.

NB: This is probably related
http://stackoverflow.com/questions/3267234/i-cannot-search-sent-emails-in-gmail-with-python

@hube
Copy link
Member

hube commented Oct 14, 2012

Yeah, that's probably the issue then. I'd fire up the python interpreter and do imap_conn.list() to see what it spits out in terms of folder names. I'd expect Google to have one unified name for the sent mail somewhere independent of internationalization... maybe there's some other name we should be looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants