MemoryError when using imaplib fetch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acgvelarde
    New Member
    • Jul 2010
    • 1

    MemoryError when using imaplib fetch

    Hi,

    Please help me, I am getting MemoryError when trying to fetch a specific email. This is the error message:

    python(24622,0x 1888c00) malloc: *** vm_allocate(siz e=3309568) failed (error code=3)
    python(24622,0x 1888c00) malloc: *** error: can't allocate region
    python(24622,0x 1888c00) malloc: *** set a breakpoint in szone_error to debug
    Exception in thread Thread-1:Traceback (most recent call last):
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.3/lib/python2.3/threading.py", line 442, in __bootstrap
    self.run()
    File "/Volumes/SvnDevDisk/branches/HaversackProjec t_Version_0.2/plugins/GaMailClientPlu gin/python/imap/imap_reader.py" , line 25, in run
    self.readMailbo x(eachMailbox)
    File "/Volumes/SvnDevDisk/branches/HaversackProjec t_Version_0.2/plugins/GaMailClientPlu gin/python/imap/imap_reader.py" , line 58, in readMailbox
    resp, content = _mailConnection .fetch(num, '(RFC822 FLAGS)')
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.3/lib/python2.3/imaplib.py", line 417, in fetch
    typ, dat = self._simple_co mmand(name, message_set, message_parts)
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.3/lib/python2.3/imaplib.py", line 1004, in _simple_command
    return self._command_c omplete(name, self._command(n ame, *args))
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.3/lib/python2.3/imaplib.py", line 830, in _command_comple te
    typ, data = self._get_tagge d_response(tag)
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.3/lib/python2.3/imaplib.py", line 935, in _get_tagged_res ponse
    self._get_respo nse()
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.3/lib/python2.3/imaplib.py", line 896, in _get_response
    data = self.read(size)
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.3/lib/python2.3/imaplib.py", line 231, in read
    return self.file.read( size)
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.3/lib/python2.3/socket.py", line 302, in read
    data = self._sock.recv (recv_size)
    MemoryError

    And here is my code for fetching

    Code:
    resp, content = _mailConnection.fetch(num, '(RFC822 FLAGS)')
    I am using python 2.3.5

    Thanks in advance!
Working...