jadolg / webpymail

Automatically exported from code.google.com/p/webpymail
GNU General Public License v3.0
0 stars 0 forks source link

KeyError on moving messages in Gmail #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. SElect Message
2. Select folder to move
3. Press `move` booton

Messsage is moved, but exception is rised.

Environment:

Request Method: POST
Request URL: http://localhost:8080/mail/FOLDER_JkJCc0VPQVJIQkQwRVN3UTEt/
Django Version: 1.2.1
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'webpymail.wpmauth',
 'webpymail.mailapp',
 'webpymail.sabapp']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.doc.XViewMiddleware')

Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in 
get_response
  100.                     response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/decorators.py" 
in _wrapped_view
  25.                 return view_func(request, *args, **kwargs)
File 
"/home/alex/development/projects/webpymail-source/webpymail/mailapp/views/messag
e_list.py" in show_message_list_view
  78.         msgactions.batch_change( request, folder, raw_message_list )
File 
"/home/alex/development/projects/webpymail-source/webpymail/mailapp/views/msgact
ions.py" in batch_change
  99.             folder.set_flags(selected_messages, DELETED)
File "/home/alex/development/projects/webpymail-source/hlimap/imapfolder.py" in 
set_flags
  356.         return self._imap.store(message_list, '+FLAGS.SILENT', args)
File "/home/alex/development/projects/webpymail-source/imaplib2/imapp.py" in 
store
  1113.             return self.store_uid(message_set, command, flags)
File "/home/alex/development/projects/webpymail-source/imaplib2/imapp.py" in 
store_uid
  1058.         result = self.processCommandUID( name, args)
File "/home/alex/development/projects/webpymail-source/imaplib2/imapp.py" in 
processCommandUID
  1023.         tag, response = self.send_command(command)
File "/home/alex/development/projects/webpymail-source/imaplib2/imapll.py" in 
send_command
  268.             return tag, self.read_responses(tag)
File "/home/alex/development/projects/webpymail-source/imaplib2/imapll.py" in 
read_responses
  326.         return self.parse_command(tag, response)
File "/home/alex/development/projects/webpymail-source/imaplib2/imapp.py" in 
parse_command
  258.         self._parse_untagged(tag, response['untagged'])
File "/home/alex/development/projects/webpymail-source/imaplib2/imapp.py" in 
_parse_untagged
  249.                 meth( code, args )
File "/home/alex/development/projects/webpymail-source/imaplib2/imapp.py" in 
EXPUNGE_response
  327.         self.sstatus['current_folder']['expunge_list'].append(int(args))

Exception Type: KeyError at /mail/FOLDER_JkJCc0VPQVJIQkQwRVN3UTEt/
Exception Value: 'expunge_list'

Original issue reported on code.google.com by akimov.alex on 20 Sep 2010 at 2:25

GoogleCodeExporter commented 9 years ago
Confirmed.

Original comment by hguerreiro@gmail.com on 20 Sep 2010 at 10:24

GoogleCodeExporter commented 9 years ago
Bahh The Google IMAP behavior is not according to the RFC, when we mark a 
message deleted it expunges it from the mailbox. This is the first part of the 
problem and it's easily fixed:

C: EGAN008 UID STORE 1140 +FLAGS.SILENT (\Deleted)<cr><lf>
S: * 75 EXPUNGE<cr><lf>
S: * 78 EXISTS<cr><lf>
S: EGAN008 OK Success<cr><lf>

A workaround for this behavior is enabling "Advanced IMAP Controls" in gmail 
Settings → Labs. 

I'm going to fix this at the hlimap level.

Original comment by hguerreiro@gmail.com on 22 Sep 2010 at 12:03

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r88.

Original comment by hguerreiro@gmail.com on 22 Sep 2010 at 12:19