Skip to content

Gmail Accounts in Languages other than English #28

@sveitser

Description

@sveitser

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions