Any obvious reasons for memory error on Windows 7 32bit Python?

I'm getting my first memory error in python and I wonder if you can help point me in the right direction! Obviously, I am trying to download a file that might be bigger than the others. I am using Python 32bit. Will try 64bit next. Anything else? Thanks!

Traceback (most recent call last):
  ...
  File "..\src\mink.py", line 89, in __init__
    getattr(self, cmd)(args)
  File "..\src\mink.py", line 157, in getPackage
    self.sar.saveAttachments(xml=mmX, dir=self.pix_dir)
  File "C:\Users\M-MM0002\Documents\PY\MpApi\src\Sar.py", line 259, in saveAttac
hments
    r = self.api.getAttachment(module="Multimedia", id=mmId)
  File "C:\Users\M-MM0002\Documents\PY\MpApi\src\MpApi.py", line 259, in getAtta
chment
    r = requests.get(url, headers=self.headers, auth=self.auth)
  File "C:\Users\M-MM0002\Documents\PY3\lib\site-packages\requests\api.py", line
 76, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\M-MM0002\Documents\PY3\lib\site-packages\requests\api.py", line
 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\M-MM0002\Documents\PY3\lib\site-packages\requests\sessions.py",
 line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\M-MM0002\Documents\PY3\lib\site-packages\requests\sessions.py",
 line 683, in send
    r.content
  File "C:\Users\M-MM0002\Documents\PY3\lib\site-packages\requests\models.py", l
ine 829, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
MemoryError

Line 259 in my programm is a simple requests.get:

r = requests.get(url, headers=self.headers, auth=self.auth)

Memory usage of Python spikes during this process, but not that much. Way less than 1GB. Seems normal to me.



Read more here: https://stackoverflow.com/questions/67382805/any-obvious-reasons-for-memory-error-on-windows-7-32bit-python

Content Attribution

This content was originally published by mokko at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: