WindowsError: stack overflow

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hardieca@hotmail.com

    #1

    WindowsError: stack overflow

    Hi,

    I'm developing a program that analyzes all the webpages on my
    webserver.

    I've created one class, Filewalker(), with a function that returns the
    paths of all ASP pages of interest as a list, which I then turn into a
    tuple.

    I then iterate over the tuple, passing each path to my Analyzer()
    class, which immediately creates an instance of Webpage(), which takes
    the path and using urllib, downloads the source of the webpage and
    returns it as a string to the Analyzer() object. The Analyzer() object
    then examines the source, and when it comes across an error in the
    source, writes the error to a log file.

    I can get through about 1750 pages of 5000 before I get a WindowsError:
    stack overflow exception. Any ideas how I can keep the program chugging
    along?

    Regards,

    Chris

  • Terry Reedy

    #2
    Re: WindowsError: stack overflow


    <hardieca@hotma il.com> wrote in message
    news:1127834209 .353672.316530@ g44g2000cwa.goo glegroups.com.. .[color=blue]
    > I can get through about 1750 pages of 5000 before I get a WindowsError:
    > stack overflow exception. Any ideas how I can keep the program chugging
    > along?[/color]

    A typical source of stack overflow is recursion. Without seeing the code
    or actual stacktrace, I would guess that you are somehow using recursion
    instead of iteration. Or perhaps you are analyzing big, deeply nested
    pages.

    Terry J. Reedy



    Comment

    Working...