473,587 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script Error

Hi Guys,

I am facing a problem with a script that i had written to automate
opening a website and signing on to it. It was running fine for a long
time but all of a sudden it has stopped progressing beyond opening the
URL. I ran the code line by line on the pythonwin's IDE and it ran fine
but when i execute the whole script it gives this error:
Traceback (most recent call last):
File
"C:\Python24\Li b\site-packages\python win\pywin\frame work\scriptutil s.py",
line 307, in RunScript
debugger.run(co deObject, __main__.__dict __, start_stepping= 0)
File
"C:\Python24\Li b\site-packages\python win\pywin\debug ger\__init__.py ",
line 60, in run
_GetCurrentDebu gger().run(cmd, globals,locals, start_stepping)
File
"C:\Python24\Li b\site-packages\python win\pywin\debug ger\debugger.py ",
line 631, in run
exec cmd in globals, locals
File "C:\Documen ts and
Settings\Deskto p\pi\Ressurecti on\Dec\19\CoE.p y", line 4, in ?
ie.SetTextBox(u sername,'txtUse rId',0)
File "cPAMIE.py" , line 387, in SetTextBox
doc = self._ie.Docume nt.forms[frmName]
File "C:\Python24\Li b\site-packages\win32c om\client\dynam ic.py", line
216, in __getitem__
return self._get_good_ object_(self._e num_.__getitem_ _(index))
File "C:\Python24\Li b\site-packages\win32c om\client\util. py", line
37, in __getitem__
return self.__GetIndex (index)
File "C:\Python24\Li b\site-packages\win32c om\client\util. py", line
56, in __GetIndex
raise IndexError, "list index out of range"
IndexError: list index out of range

The code i was using is:

import cPAMIE

ie= cPAMIE.PAMIE()

ie.Navigate ('URL')
ie.SetTextBox(u sername,'txtUse rId',0)
ie.SetTextBox(p wd,'txtPassword ',0)
ie.ClickButton( 'btnSubmit',0)

Any ideas as to why am i getting this error when running the code as a
script

Thanks in advance,
Forced

Dec 19 '06 #1
3 2456
Guys any suggestions ?

Could it be because of a MS patch or something as i believe i had some
patching on the windows box i was running this script on.
Forced_Ambition s wrote:
Hi Guys,

I am facing a problem with a script that i had written to automate
opening a website and signing on to it. It was running fine for a long
time but all of a sudden it has stopped progressing beyond opening the
URL. I ran the code line by line on the pythonwin's IDE and it ran fine
but when i execute the whole script it gives this error:
Traceback (most recent call last):
File
"C:\Python24\Li b\site-packages\python win\pywin\frame work\scriptutil s.py",
line 307, in RunScript
debugger.run(co deObject, __main__.__dict __, start_stepping= 0)
File
"C:\Python24\Li b\site-packages\python win\pywin\debug ger\__init__.py ",
line 60, in run
_GetCurrentDebu gger().run(cmd, globals,locals, start_stepping)
File
"C:\Python24\Li b\site-packages\python win\pywin\debug ger\debugger.py ",
line 631, in run
exec cmd in globals, locals
File "C:\Documen ts and
Settings\Deskto p\pi\Ressurecti on\Dec\19\CoE.p y", line 4, in ?
ie.SetTextBox(u sername,'txtUse rId',0)
File "cPAMIE.py" , line 387, in SetTextBox
doc = self._ie.Docume nt.forms[frmName]
File "C:\Python24\Li b\site-packages\win32c om\client\dynam ic.py", line
216, in __getitem__
return self._get_good_ object_(self._e num_.__getitem_ _(index))
File "C:\Python24\Li b\site-packages\win32c om\client\util. py", line
37, in __getitem__
return self.__GetIndex (index)
File "C:\Python24\Li b\site-packages\win32c om\client\util. py", line
56, in __GetIndex
raise IndexError, "list index out of range"
IndexError: list index out of range

The code i was using is:

import cPAMIE

ie= cPAMIE.PAMIE()

ie.Navigate ('URL')
ie.SetTextBox(u sername,'txtUse rId',0)
ie.SetTextBox(p wd,'txtPassword ',0)
ie.ClickButton( 'btnSubmit',0)

Any ideas as to why am i getting this error when running the code as a
script

Thanks in advance,
Forced
Dec 22 '06 #2
ie.Navigate ('URL')
ie.SetTextBox(u sername,'txtUse rId',0)

not sure but shouldn't you be waiting for navigate to actually
finish loading the page before setting fields?

see the ie.Busy or ie.readyState properties/methods

Dec 22 '06 #3
"Forced_Ambitio ns" <dh************ @gmail.comwrite s:
Guys any suggestions ?

Could it be because of a MS patch or something as i believe i had some
patching on the windows box i was running this script on.
Forced_Ambition s wrote:
Hi Guys,

I am facing a problem with a script that i had written to automate
opening a website and signing on to it. It was running fine for a long
time but all of a sudden it has stopped progressing beyond opening the
URL. I ran the code line by line on the pythonwin's IDE and it ran fine
but when i execute the whole script it gives this error:
Traceback (most recent call last):
File
"C:\Python24\Li b\site-packages\python win\pywin\frame work\scriptutil s.py",
line 307, in RunScript
debugger.run(co deObject, __main__.__dict __, start_stepping= 0)
File
"C:\Python24\Li b\site-packages\python win\pywin\debug ger\__init__.py ",
line 60, in run
_GetCurrentDebu gger().run(cmd, globals,locals, start_stepping)
File
"C:\Python24\Li b\site-packages\python win\pywin\debug ger\debugger.py ",
line 631, in run
exec cmd in globals, locals
File "C:\Documen ts and
Settings\Deskto p\pi\Ressurecti on\Dec\19\CoE.p y", line 4, in ?
ie.SetTextBox(u sername,'txtUse rId',0)
File "cPAMIE.py" , line 387, in SetTextBox
doc = self._ie.Docume nt.forms[frmName]
File "C:\Python24\Li b\site-packages\win32c om\client\dynam ic.py", line
216, in __getitem__
return self._get_good_ object_(self._e num_.__getitem_ _(index))
File "C:\Python24\Li b\site-packages\win32c om\client\util. py", line
37, in __getitem__
return self.__GetIndex (index)
File "C:\Python24\Li b\site-packages\win32c om\client\util. py", line
56, in __GetIndex
raise IndexError, "list index out of range"
IndexError: list index out of range

The code i was using is:

import cPAMIE

ie= cPAMIE.PAMIE()

ie.Navigate ('URL')
ie.SetTextBox(u sername,'txtUse rId',0)
ie.SetTextBox(p wd,'txtPassword ',0)
ie.ClickButton( 'btnSubmit',0)

Any ideas as to why am i getting this error when running the code as a
script

Thanks in advance,
Forced
could you tell me more about the module, cPAMIE? if you can, give me a
link to a documentation of this module.
Dec 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
6004
by: Will Seay | last post by:
At the end of this message I've pasted a script we're trying to modify slightly. I don't believe it is VBscript or javascript but these are the closest groups I could find with my limited programming knowledge. Basically, we are trying to add a few lines to this script that will execute a few shell commands (see comments at the very end of...
6
34047
by: Clay Beatty | last post by:
When you create database diagrams in Enterprise Manager, the details for constructing those diagrams is saved into the dtproperties table. This table includes an image field which contains most of the relevant infomation, in a binary format. SQL Enterprise manager offers no way to script out those diagrams, so I have created two Transact...
12
2976
by: tshad | last post by:
I am not sure why I am getting this error: I have the following code I want to run from another include file that holds all my functions. functions.inc ************************************************************************************ <Script runat="Server"> Sub fnHeader(client As String) response.write("<!-- #include file =...
17
7900
by: comp.lang.tcl | last post by:
The TCL command I am using will do a command-line action on a PHP script: set cannotRunPHP I have to do it this way as both the TCL script and the PHP script run as CLI. However, "info.php" requires user input to run; this causes the TCL script calling the PHP script to hose up and die. Is there a way I can do this so that the TCL...
19
3816
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
5
1995
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On some pages I have applied a small client-script to trap the enter-key beeing pressed and re-route this action. With the new version this little script...
15
3234
by: Lawrence Krubner | last post by:
Does anything about this script look expensive, in terms of resources or execution time? This script dies after processing about 20 or 25 numbers, yet it leaves no errors in the error logs. This is on a server that handles a fairly demanding site. The defaults, in php.ini, have all been cranked fairly high: scripts get 180 seconds to run, and...
3
4501
by: GazK | last post by:
I have been using an xml parsing script to parse a number of rss feeds and return relevant results to a database. The script has worked well for a couple of years, despite having very crude error-trapping (if it finds an error in one of the xml files, the script stops). Recently, the script has stopped working because one of the xml files is...
1
47430
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or...
7
16146
by: jeddiki | last post by:
Hi, As I am in Turkey at present, I can not see vidoes on youtube. So I have tried a few proxies but keep finding them slow or not working. So I have installed myphpProxy on my server under the domain name www.blog-start.com Unfortuantely it is not not working correctly
0
7923
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.