Re: easy install

Discussion in 'Python' started by Ethan Furman, Oct 10, 2009.

  1. Ethan Furman

    Ethan Furman Guest

    Robert Kern wrote:
    > On 2009-10-09 19:08 PM, David Robinow wrote:
    >
    >> On Fri, Oct 9, 2009 at 5:02 PM, Ethan Furman<> 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')

    >
    >
    > I think he's asking why the exception message does not have the source
    > lines in the traceback, like exceptions inside regularly installed
    > packages.
    >
    > The answer is that once files are zipped, like the egg that you have
    > installed, the traceback printing function in C does not know how to get
    > at the source files any more. The traceback printing function in the
    > pure Python traceback module does, though. Try this:
    >
    > >>> import sys
    > >>> import traceback
    > >>> sys.excepthook = traceback.print_exception

    >


    Good to know, thank you.

    Besides missing the source lines, I was also wondering why the path in
    the traceback is showing incorrectly; I have the egg in
    c:\python25\Lib\site-packages, not where the trackback says I have it.

    In an effort to get it looking right, as well as to get the missing
    source lines, I broke the egg and copied the xlwt folder out of it and
    directly into site-packages -- everything (except the trackbacks, grrr)
    still worked, leaving me as mystified as ever.

    Any light to shed on that strangeness?

    ~Ethan~
    Ethan Furman, Oct 10, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    638
    Hazzard
    Apr 6, 2004
  2. =?Utf-8?B?ZWxsaXN5ZGpvZ3Jh?=

    how to install a easy disk memory stick

    =?Utf-8?B?ZWxsaXN5ZGpvZ3Jh?=, Jul 30, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,431
    =?Utf-8?B?VmlqYXk=?=
    Aug 2, 2005
  3. Replies:
    5
    Views:
    411
    Damjan
    May 8, 2006
  4. Bruno Desthuilliers
    Replies:
    5
    Views:
    385
    Bruno Desthuilliers
    Aug 29, 2007
  5. Replies:
    3
    Views:
    1,494
Loading...

Share This Page