Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'algorithm': 0.04; 'feasible.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; '(there': 0.16; 'give.': 0.16; 'means:': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'space)': 0.16; 'this)': 0.16; 'memory': 0.22; 'header:User- Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'related': 0.29; 'code': 0.31; 'produces': 0.31; 'writes:': 0.31; 'lists': 0.32; 'cases': 0.33; 'could': 0.34; 'there': 0.35; 'options:': 0.36; 'subject:data': 0.36; 'charset:us-ascii': 0.36; 'similar': 0.36; 'operating': 0.37; 'two': 0.37; 'needed': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'experts': 0.60; 'tell': 0.60; 'kindly': 0.61; 'received:217': 0.63; 'such': 0.63; 'more': 0.64; 'limit': 0.70; 'increase': 0.74 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: dieter Subject: Re: MemoryError in data conversion Date: Mon, 14 Apr 2014 08:14:07 +0200 References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gmane-NNTP-Posting-Host: pd9e0a2f7.dip0.t-ipconnect.de User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) Cancel-Lock: sha1:xswAgRnRXIY4YcFaOh5MV/X4Zd0= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1397456067 news.xs4all.nl 2954 [2001:888:2000:d::a6]:49836 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70204 Mok-Kong Shen writes: > The code attached below produces in one of the two IMHO similar cases > (excepting the sizes of the lists involved) MemoryError. Could experts > kindly tell why that's so and whether there is any work-around feasible. "MemoryError" means: the Python process wants more memory from the operating system than this can give. Your options: * increase the memory resources (RAM, swap space) of your system * check the memory related configuration of your operating system (there may be a limit for memory allocated to processes - try to increase this) * change your algorithm such that less memory is needed