Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Memory limit
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jmruiz  
View profile  
 More options Sep 23 2010, 5:10 am
From: jmruiz <juanmar...@gmail.com>
Date: Thu, 23 Sep 2010 02:10:58 -0700 (PDT)
Local: Thurs, Sep 23 2010 5:10 am
Subject: Memory limit
Hi,

someone knows the limit in size or rows or anything for a Workbook to
execute a save correctly?

I'm working with a Workbook with 65rows*6pages and I get the following
error:

MemoryError:
File "e:\FUENTES\informeTx\informeTxTipo2.py", line 251, in <module>
  creaXLS(ficheroSalida,lasFilas)
File "e:\FUENTES\informeTx\informeTxTipo2.py", line 178, in creaXLS
  book.save(nombreXLS)
File "c:\python26\lib\site-packages\xlwt-0.7.2-py2.6-win32.egg\xlwt
\Workbook.py", line 634, in save
File "c:\python26\lib\site-packages\xlwt-0.7.2-py2.6-win32.egg\xlwt
\Workbook.py", line 628, in get_biff_data

Any idea?

Thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Machin  
View profile  
 More options Sep 23 2010, 7:09 am
From: John Machin <sjmac...@lexicon.net>
Date: Thu, 23 Sep 2010 21:09:06 +1000
Local: Thurs, Sep 23 2010 7:09 am
Subject: Re: [pyxl] Memory limit
On 23/09/2010 7:10 PM, jmruiz wrote:

> Hi,

> someone knows the limit in size or rows or anything for a Workbook to
> execute a save correctly?

No. It depends on too many factors.

> I'm working with a Workbook with 65rows*6pages and I get the following
> error:

 >
 > MemoryError:

page == sheet?
Do you mean 65 rows or 65000 rows?
How many columns and how many rows in each sheet?
Is the data that you are writing in any way abnormal e.g. you are
writing many text cells each of which contains a screen dump or an email
message?

How much memory do you have on your computer? How much (a) real memory
(b) swap space is being used by other processes?
Can you increase the (a) real memory (b) swap space available to xlwt
when you are trying to create this file?
Are you on a *x platform with an unreasonable "ulimit"?

Have you considered using Worksheet.flush_row_data ?

"""If a large number of rows have been written to a Worksheet and memory
usage is
becoming a problem, the flush_row_data method may be called on the
Worksheet.
Once called, any rows flushed cannot be accessed or modified.
It is recommended that flush_row_data is called for every 1000 or so
rows of a normal
size that are written to an xlwt.Workbook. If the rows are huge, that
number should be
reduced.""" ... taken from page 21 of the tutorial available from
http://www.python-excel.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
George  
View profile  
 More options Sep 4 2012, 6:52 am
From: George <georg.wink...@googlemail.com>
Date: Tue, 4 Sep 2012 03:52:25 -0700 (PDT)
Local: Tues, Sep 4 2012 6:52 am
Subject: Re: [pyxl] Memory limit

Hi,

I am having exactly the same error message. I am writing an Excel workbook
(~ 430 MB size) with 30 worksheets and each up to 60,000 lines. I do a
flush() every 1000 lines. As there is more data every day it now always
crashes on my WinXP 32 bit system with 4 GB Ram. The python process uses ~
500 MB ram and I have enough Ram/Swap left. When I run it under Win7 64 bit
with 16 GB Ram in 32 bit Python it crashes only occasionally. So RAM size
seems to play a role.

Any other ideas except for splitting the output file in two?

George

----snip---

    # flushing last time
    currentWs.flush_row_data()

    # save the whole workbook at the end
    wbOutput.save( cOutputFileName )

----snip---

 File "H:\APPS\eclipse\workspace\generatenewfile\src\generatenewfile.py",
line 193, in processZgsFiles
    wbOutput.save( cOutputFileName )
  File "C:\Program Files\Python\lib\site-packages\xlwt\Workbook.py", line
643, in save
    doc.save(filename, self.get_biff_data())
  File "C:\Program Files\Python\lib\site-packages\xlwt\Workbook.py", line
629, in get_biff_data
    sheets += data
MemoryError


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Yeung  
View profile  
 More options Sep 11 2012, 12:24 am
From: John Yeung <gallium.arsen...@gmail.com>
Date: Tue, 11 Sep 2012 00:24:24 -0400
Local: Tues, Sep 11 2012 12:24 am
Subject: Re: [pyxl] Memory limit

On Tue, Sep 4, 2012 at 6:52 AM, George <georg.wink...@googlemail.com> wrote:
> I am writing an Excel workbook
> (~ 430 MB size) with 30 worksheets and each up to 60,000 lines. I do a
> flush() every 1000 lines. As there is more data every day [...]
> Any other ideas except for splitting the output file in two?

My other idea would be to store the data in an actual database, rather
than in an Excel workbook.  That is way more data than is healthy for
Excel, especially when using the .xls format.

John Y.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Withers  
View profile  
 More options Sep 14 2012, 12:24 pm
From: Chris Withers <ch...@simplistix.co.uk>
Date: Fri, 14 Sep 2012 17:24:26 +0100
Local: Fri, Sep 14 2012 12:24 pm
Subject: Re: [pyxl] Memory limit
On 04/09/2012 11:52, George wrote:

> # flushing last time
> currentWs.flush_row_data()

How often are you calling flush_row_data?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
George  
View profile  
 More options Sep 18 2012, 12:14 pm
From: George <georg.wink...@googlemail.com>
Date: Tue, 18 Sep 2012 09:14:59 -0700 (PDT)
Local: Tues, Sep 18 2012 12:14 pm
Subject: Re: [pyxl] Memory limit

flush_row_data is called ~ 700 times.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Withers  
View profile  
 More options Sep 27 2012, 7:44 am
From: Chris Withers <ch...@simplistix.co.uk>
Date: Thu, 27 Sep 2012 12:44:07 +0100
Local: Thurs, Sep 27 2012 7:44 am
Subject: Re: [pyxl] Memory limit

On 18/09/2012 17:14, George wrote:

> flush_row_data is called ~ 700 times.

That's not a very useful answer.

How many rows are you writing between calls to flush_row_data?

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Yeung  
View profile  
 More options Sep 27 2012, 9:54 am
From: John Yeung <gallium.arsen...@gmail.com>
Date: Thu, 27 Sep 2012 09:54:49 -0400
Local: Thurs, Sep 27 2012 9:54 am
Subject: Re: [pyxl] Memory limit

On Thu, Sep 27, 2012 at 7:44 AM, Chris Withers <ch...@simplistix.co.uk> wrote:

> On 18/09/2012 17:14, George wrote:

>> flush_row_data is called ~ 700 times.

> That's not a very useful answer.

> How many rows are you writing between calls to flush_row_data?

Maybe he answered it that way because earlier in the thread (in his
first post) he already mentioned that he's flushing every 1000 rows.

Although, I'm not sure it adds up.  He said (as I quoted before in
*my* previous post):

On Tue, Sep 4, 2012 at 6:52 AM, George <georg.wink...@googlemail.com> wrote:
> I am writing an Excel workbook
> (~ 430 MB size) with 30 worksheets and each up to 60,000 lines. I do a
> flush() every 1000 lines. As there is more data every day [...]

If there are 30 worksheets, each with 60,000 rows, and a flush every
1000 rows, then shouldn't there be more like 1800 flushes rather than
700?

John Y.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »