OH, I'm A Lumberjack And I'm OK...

Robert Kern kernr at mail.ncifcrf.gov
Fri Sep 3 02:57:11 EDT 1999


On Fri, 03 Sep 1999 02:31:55 -0400, David Oppenheimer
<davidopp at megsinet.net> wrote:

>OK, I lied, here's yet another post in my continuing struggle to run painter.py
>
>I took Robin's PYTHONPATH suggestion and now my traceback is as follows:
>
>>>> Traceback (innermost last):
>  File "C:\Python\Pythonwin\pywin\framework\scriptutils.py", line 237, in
>RunScript
>    exec codeObject in __main__.__dict__
>  File "C:\Python\scripts\painter.py", line 65, in ?
>    im = Image.open(sys.argv[1])
>IndexError: list index out of range
>
>I have now gotten to line 65 before I get an error (this is a tremendous
>improvement of 53 lines more of code processed before an error kills the
>program).

This means that you need to supply a command line argument.
painter.py was written to be used on the command line like so:

C:\Python\Scripts> python painter.py <Image>

where <Image> is the name of an image file.

>All Hail Robin Dunn, Master of wxPython and all around troubleshooter.  Got any
>ideas what the heck this last error means Robin?
>
>David O.

[snip]
Robert Kern           |
----------------------|"In the fields of Hell where the grass grows high
This space            | Are the graves of dreams allowed to die."
intentionally         |           - Richard Harter
left blank.           |




More information about the Python-list mailing list