[Expect] FW: Error in Expect "spawn id exp5 not open"
by Stephen Cattaneo other posts by this author
Aug 8 2007 12:14PM messages near this date
view in the new Beta List Site
Re: [Expect] Expect Digest, Vol 40, Issue 3
|
Re: [Expect] FW: Error in Expect "spawn id exp5 not open"
Forgot to copy the list.
-s
________________________________
From: Stephen Cattaneo
Sent: Wednesday, August 08, 2007 12:14 PM
To: 'Suresh Sundararaman'
Subject: RE: [Expect] Error in Expect "spawn id exp5 not open"
This is common error with expect. Trying inserting a few sleeps:
package require Expect
spawn telnet 192.168.xx.xx
expect login:
sleep 2
send "root\r"
expect Password:
sleep 2
send "admin123\r"
expect #
sleep 2
send "\r"
expect #
send "show run\r"
expect #
________________________________
From: expect-bounces@[...].com
[mailto:expect-bounces@[...].com] On Behalf Of Suresh
Sundararaman
Sent: Wednesday, August 08, 2007 12:12 PM
To: jeffh@activestate.com; expect@[...].com
Subject: [Expect] Error in Expect "spawn id exp5 not open"
Jeff / Expect Gurus,
I use Windows XP and run basic expect command in the tclsh console of
the activestate TCL version 8.4.15.0 and i get an error.
I use expect to do a telnet to the gateway and send some commands to
config it. But i get an error as "spawn id exp5 not open" when the send
command is used.
The script is here :
package require Expect
spawn telnet 192.168.xx.xx
expect login:
send "root\r"
expect Password:
send "admin123\r"
expect #
send "\r"
expect #
send "show run\r"
expect #
I get the following error when i run the above file in tclsh console :
% source GW_connect.exp
child process exited abnormally
% send: spawn id exp5 not open
%
% tclsh GW_connect.exp
send: spawn id exp4 not open
while executing
"send "root\r""
(file "GW_connect.exp" line 4)
I tried googling but could not find any solution.Can anyone just let me
know why this error comes and how can i get out of it and can run the
script successfully.
Eagerly waiting for the reply.
Rgds,
s.suresh
________________________________
Want to look great? Get expert opinion on beauty and skin care. Ask the
expert! <http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm>
Thread:
Stephen Cattaneo
Suresh Sundararaman
|