os.write exception errno 22

235 views
Skip to first unread message

Paul Hampson

unread,
Apr 3, 2012, 11:23:36 AM4/3/12
to winpe...@googlegroups.com
Hi,

I am trying to use the winpexpect library as a compatible drop in for pexpect for some test scripts we have.

You can see the relevant code here - https://github.com/xcore/sc_multi_uart/tree/automated_testing/test/serial_test/src in telnet_test.py

When the script is run I get the following exception:

Traceback (most recent call last):
  File "s2e_test.py", line 260, in <module>
    main()
  File "s2e_test.py", line 252, in main
    handle_telnet_tests(args, seed)
  File "s2e_test.py", line 162, in handle_telnet_tests
    test_pass += telnet_test.app_start_up_check_using_telnet()
  File "C:\Documents and Settings\User1\sandbox\sc_multi_uart\test\serial_test\s
rc\telnet_tests.py", line 76, in app_start_up_check_using_telnet
    telnet_session = self.telnet_s2e_connect()
  File "C:\Documents and Settings\User1\sandbox\sc_multi_uart\test\serial_test\s
rc\telnet_tests.py", line 57, in telnet_s2e_connect
    telnet_session.sendline("")
  File "c:\Python27\lib\site-packages\winpexpect-1.5-py2.7.egg\pexpect.py", line
 962, in sendline
    n = n + self.send (os.linesep)
  File "c:\Python27\lib\site-packages\winpexpect-1.5-py2.7.egg\pexpect.py", line
 953, in send
    c = os.write(self.child_fd, s.encode('ascii'))
OSError: [Errno 22] Invalid argument


I am running this on windows XP with python2.7

Is there any progress on this issue/work around?

Thanks,
Paul
Reply all
Reply to author
Forward
0 new messages