easy install

David Robinow drobinow at gmail.com
Sat Oct 10 02:08:37 CEST 2009


On Fri, Oct 9, 2009 at 5:02 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> A puzzlement:
>
> I used easy_install the other day to get xlutils on my system.  It
> automatically installed xlrd and xlwt as well.  This is cool.  What's not so
> cool are my tracebacks.  E.g.
>
> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
> on win32
> Type "help", "copyright", "credits" or "license" for more information.
> --> import xlwt
> --> xlwt.__name__
> 'xlwt'
> --> xlwt.__file__
> 'C:\\Python25\\lib\\site-packages\\xlwt-0.7.2-py2.5-win32.egg\\xlwt\\__init__.pyc'
> --> xlwt.Workbook().save('non-file')
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File
> "c:\docume~1\ethanf\locals~1\temp\easy_install-q1s1rb\xlwt-0.7.2-py2.5-win32.egg.tmp\xlwt\Workbook.py",
> line 634, in save
>  File
> "c:\docume~1\ethanf\locals~1\temp\easy_install-q1s1rb\xlwt-0.7.2-py2.5-win32.egg.tmp\xlwt\Workbook.py",
> line 615, in get_biff_data
> IndexError: list index out of range
> -->
>
> Anyone know why that is?
>
> ~Ethan~
> --
> http://mail.python.org/mailman/listinfo/python-list
>
You can't save a workbook with no worksheets.
Try:
W = xlwt.Workbook()
W.add_sheet('no-sheet')
W.save('non-file')



More information about the Python-list mailing list