Opened 7 years ago

Closed 7 years ago

#10017 closed defect (fixed)

Windows twisted.internet.stdio.StandardIO.__init__ lacks "stdin" keyword argument.

Reported by: dcf Owned by: infinity0
Priority: Medium Milestone:
Component: Circumvention/Pluggable transport Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: #10006 Points:
Reviewer: Sponsor:

Description

I see this error when I try to run obfs-flash-client on Windows:

$ TOR_PT_STATE_LOCATION=. TOR_PT_MANAGED_TRANSPORT_VER=1 TOR_PT_CLIENT_TRANSPORTS=obfs3_flashproxy ./obfs-flash-client 2334
VERSION 1
Traceback (most recent call last):
  File "obfs-flash-client", line 272, in <module>
  File "obfs-flash-client", line 267, in main
  File "obfs-flash-client", line 217, in obfs3_flashproxy
  File "obfs-flash-client", line 188, in pt_launch_child
TypeError: __init__() got an unexpected keyword argument 'stdin'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "atexit.pyc", line 24, in _run_exitfuncs
  File "pyptlib\util\subproc.pyc", line 186, in killall
  File "twisted\internet\base.pyc", line 582, in stop
ReactorNotRunning: Can't stop reactor that isn't running.
Error in sys.exitfunc:
Traceback (most recent call last):
  File "atexit.pyc", line 24, in _run_exitfuncs
  File "pyptlib\util\subproc.pyc", line 186, in killall
  File "twisted\internet\base.pyc", line 582, in stop
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.

The line in question is

    StandardIO(sub_protocol, stdin=sub_proc.stdout.fileno(), reactor=reactor)

The stdio module is implemented by one of the two modules _posixstdio and _win32stdio. The constructor for _posixstdio has the stdin keyword argument, but the constructor for _win32stdio does not.

Some web searching turned up the bug report

I'm using Twisted 12.3.

Child Tickets

Change History (5)

comment:1 Changed 7 years ago by dcf

Ximin, did you earlier have obfs-flash-client working on Windows? What were you doing differently?

comment:2 Changed 7 years ago by dcf

Parent ID: #10006

comment:3 Changed 7 years ago by infinity0

Hopefully fixed here: https://github.com/infinity0/obfs-flash/compare/master...fix-w32-standardio

I ran a standalone obfs-flash-client without errors, but did not try an integration test with tor, because of that other issue I emailed you about. If you have a plain flashproxy working end-to-end on windows, you can do an integration test with the fixed obfs-flash-client above, then I'll push it to master if it works for you.

comment:4 Changed 7 years ago by dcf

Sweet, it works. Please merge it.

comment:5 Changed 7 years ago by infinity0

Resolution: fixed
Status: newclosed

Pushed to tpo master!

Note: See TracTickets for help on using tickets.