exceptions.ImportError: cannot import name _WrappingProtoco
At 2012-12-30 20:57:43 Deleted user wrote:
d@d:~/ooni-probe$ ./bin/ooniprobe nettests/blocking/dnstamper.py -f hosts.txt WARNING: Failed to execute tcpdump. Check it is installed and in the PATH Log opened. [D] No test deck detected [D] processing options [D] Checking if backend is present [D] Checking if file is present Starting Tor... [D] Setting control port as 26177 [D] Setting SOCKS port as 45954 [D] 10%: Finishing handshake with directory server [D] 15%: Establishing an encrypted directory connection [D] 20%: Asking for networkstatus consensus [D] 25%: Loading networkstatus consensus [D] 45%: Asking for relay descriptors [D] 50%: Loading relay descriptors [D] 53%: Loading relay descriptors [D] 57%: Loading relay descriptors [D] 61%: Loading relay descriptors [D] 64%: Loading relay descriptors [D] 68%: Loading relay descriptors [D] 72%: Loading relay descriptors [D] 76%: Loading relay descriptors [D] 80%: Connecting to the Tor network [D] 85%: Finishing handshake with first hop [D] 90%: Establishing a Tor circuit [D] 100%: Done [D] Building a TorState Successfully bootstrapped Tor [D] We now have the following circuits: [D] * <Circuit 1 BUILT [194.109.206.212] for GENERAL> [D] * <Circuit 2 BUILT [88.198.100.230] for GENERAL> [D] * <Circuit 3 BUILT [195.242.152.250] for GENERAL> [D] * <Circuit 4 BUILT [195.191.16.63] for GENERAL> [D] * <Circuit 5 BUILT [91.206.27.30] for GENERAL> [D] * <Circuit 6 BUILT [94.126.178.1] for GENERAL> [D] * <Circuit 7 BUILT [188.40.32.154] for GENERAL> [D] * <Circuit 8 LAUNCHED [] for GENERAL> [D] * <Circuit 9 BUILT [87.106.249.118] for GENERAL> [D] * <Circuit 10 BUILT [31.172.30.4] for GENERAL> [D] * <Circuit 11 BUILT [176.65.109.60] for GENERAL> [D] * <Circuit 12 BUILT [173.246.82.97] for GENERAL> [D] * <Circuit 13 BUILT [178.86.31.41] for GENERAL> [D] * <Circuit 14 BUILT [37.130.227.133] for GENERAL> [D] * <Circuit 15 BUILT [173.254.216.69] for GENERAL> [D] * <Circuit 16 BUILT [80.237.226.75] for GENERAL> [D] * <Circuit 17 BUILT [31.172.30.2] for GENERAL> [D] * <Circuit 18 BUILT [31.172.30.1] for GENERAL> [D] * <Circuit 19 BUILT [85.25.108.113] for GENERAL> [D] * <Circuit 20 BUILT [204.45.185.164] for GENERAL> [D] * <Circuit 21 BUILT [62.141.42.149] for GENERAL> [D] * <Circuit 22 BUILT [37.130.227.134] for GENERAL> [D] * <Circuit 23 BUILT [85.214.73.63] for GENERAL> [D] * <Circuit 24 LAUNCHED [] for GENERAL> [D] * <Circuit 25 BUILT [166.70.154.130] for GENERAL> [D] * <Circuit 26 BUILT [193.10.227.195] for GENERAL> [D] * <Circuit 27 BUILT [85.25.110.235] for GENERAL> [D] * <Circuit 28 BUILT [68.169.35.102 5.135.176.63 46.167.245.50] for GENERAL> [D] * <Circuit 29 EXTENDED [68.169.35.102 83.212.98.169] for GENERAL> [D] * <Circuit 30 EXTENDED [68.169.35.102] for GENERAL> [D] Obtained our IP address from a Tor Relay None [D] Running [(<class 'nettests.blocking.dnstamper.DNSTamperTest'>, 'test_a_lookup')] [D] Options {'inputs': <ooni.nettest.inputProcessorIterator object at 0xa8280cc>, 'version': '0.4', 'name': 'DNS tamper'} [D] cmd_line_options {'pcapfile': None, 'help': 0, 'subargs': ('-f', 'hosts.txt'), 'resume': 0, 'parallelism': '10', 'test': 'nettests/blocking/dnstamper.py', 'logfile': None, 'collector': None, 'reportfile': None} [D] testsEnded: Finished running all tests Unhandled error in Deferred: Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 489, in _startRunCallbacks self._runCallbacks() File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 576, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/home/d/ooni-probe/ooni/oonicli.py", line 107, in runTestList d1 = runner.runTestCases(test_cases, options, cmd_line_options) File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1214, in unwindGenerator return _inlineCallbacks(None, gen, Deferred()) --- --- File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1071, in _inlineCallbacks result = g.send(result) File "/home/d/ooni-probe/ooni/runner.py", line 416, in runTestCases oonib_reporter = OONIBReporter(cmd_line_options) File "/home/d/ooni-probe/ooni/reporter.py", line 271, in init from ooni.utils.txagentwithsocks import Agent File "/home/d/ooni-probe/ooni/utils/txagentwithsocks.py", line 15, in from twisted.internet.endpoints import TCP4ClientEndpoint, SSL4ClientEndpoint, _WrappingProtocol, _WrappingFactory exceptions.ImportError: cannot import name _WrappingProtocol
Main loop terminated.
Twisted version:
d@d:~/ooni-probe$ ./bin/ooniprobe nettests/blocking/dnstamper.py --version WARNING: Failed to execute tcpdump. Check it is installed and in the PATH Log opened. [D] No test deck detected Twisted version: 12.3.0
The_WrappingProtocol class is not anymore in the last version of Twisted (stable, 12.3.0):
https://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.html https://twistedmatrix.com/documents/12.1.0/api/twisted.internet.endpoints.html
This issue was automatically migrated from github issue https://github.com/TheTorProject/ooni-probe/issues/28