PAMIE error help needed

david brochu jr brochu121 at gmail.com
Wed Jul 19 16:15:13 EDT 2006


I have thrown together a script which reads a list or urls from a txt file
and navigates to each url while recording how long it takes for the page to
render completely using PAMIE. For some reason I randomly get crashes
reporting:


  File "c:\Python24\scripts\PAM.py", line 30, in IE_Invoke
    ie.Navigate(url)
  File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line 496,
in
__getattr__
    raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: InternetExplorer.Application.Navigate

The code I use to browse through the list;

for x in f:
        ie = IE_Invoke(x)
        starttime = time.clock()   #get timestamp at IE startup
        wait(ie)     #wait for IE to completetly load page
        stoptime = time.clock()    #get timestamp at IE completion
        elapsed = stoptime-starttime   #calculate the runtime
        ie.QUIT()
        excel_open.xlApp.ActiveSheet.Cells(Row,1).Value = x
        excel_open.xlApp.ActiveSheet.Cells(Row,2).Value = elapsed

        Row = Row+1
        count_non_no_tool = count_non_no_tool + 1
        total_non_no_tool = elapsed + total_non_no_tool



    f = f.close()



The script crashes in different locations when it crashes so it doesn't
appear to be one url causing the problem. Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060719/b89b711b/attachment.html>


More information about the Python-list mailing list