Re: Script randomly exits for seemingly no reason with strange traceback



On Fri, 03 Feb 2012 14:14:57 -0600, Andrew Berg wrote:

It's a rare occurrence, but sometimes my script will terminate and I get
this:

Traceback (most recent call last):
File "C:\path\to\script\script.py", line 992, in <module>

That's it. And the line number is always the last line of the file
(which in my case is a blank line).

Is it reproducible? That is, can you demonstrate a script which will
*always* show this failure?

I have not seen this on Linux (where
my script can run for days or weeks on a remote server), but only on
Windows where I do most of my testing (and it typically only runs for
minutes at a time). There may be bugs in my program, but I don't see how
Python should ever print a traceback like this.

Which version of Python, which version of Windows?

If you upgrade Python, does the problem go away?

If you perturb your script (add a few blank lines at the end, or a
comment), does it go away?


--
Steven
.



Relevant Pages

  • Re: newbie question
    ... Python is fun and it's easier to use a real OS to develop the programs, ... Grant it I am a command line junky, ... "The script can be given a executable mode, or permission, using the ... the above seems to me like you are useing windows. ...
    (comp.lang.python)
  • Re: scanning under windows WIA with custom settings (dpi / etc )
    ... I'm trying to scan a document from a python 2.6 script without user ... I found a code snippet, that allows me to scan under Vista, but that ... anything in windows is a real PITA! ...
    (comp.lang.python)
  • Re: How to make statements running in strictly sequential fashion like in an interactive shell
    ... Pexpect - a Pure Python Expect-like module ... However, when I execute the script, either being invoked ... I am using Python 3.2 in Windows in which Pexpect appeared ...
    (comp.lang.python)
  • Re: read from standard input
    ... but its giving ArgumentError in windows. ... Unless you give the /actual/ error and full traceback, ... The error log is here for my above program in windows: ... what version of Python are your running? ...
    (comp.lang.python)
  • error executing "import html.parser" from a script
    ... I have Python 3.3.0 installed on Windows XP. ... The script contains only one import line. ... Traceback: ... html is not a package ...
    (comp.lang.python)