Blog-Views-Bot icon indicating copy to clipboard operation
Blog-Views-Bot copied to clipboard

'tor' isn't available on your system. Maybe it's not in your PATH?

Open johnfelipe opened this issue 7 years ago • 11 comments

Traceback (most recent call last):
  File "blog-view.py", line 34, in <module>
	with TorRequest() as tr:
  File "/usr/local/lib/python2.7/dist-packages/torrequest.py", line 21, in __init__
	self._tor_proc = self._launch_tor()
  File "/usr/local/lib/python2.7/dist-packages/torrequest.py", line 46, in _launch_tor
	take_ownership=True)
  File "/usr/local/lib/python2.7/dist-packages/stem/process.py", line 285, in launch_tor_with_config
	return launch_tor(tor_cmd, args, torrc_path, completion_percent, init_msg_handler, timeout, take_ownership)
  File "/usr/local/lib/python2.7/dist-packages/stem/process.py", line 98, in launch_tor
	raise OSError("'%s' isn't available on your system. Maybe it's not in your PATH?" % tor_cmd)
OSError: 'tor' isn't available on your system. Maybe it's not in your PATH?

How can solve this?

johnfelipe avatar Apr 03 '18 05:04 johnfelipe

i put this apt-get install tor and error now is:

Traceback (most recent call last):
  File "blog-view.py", line 34, in <module>
	with TorRequest() as tr:
  File "/usr/local/lib/python2.7/dist-packages/torrequest.py", line 21, in __init__
	self._tor_proc = self._launch_tor()
  File "/usr/local/lib/python2.7/dist-packages/torrequest.py", line 46, in _launch_tor
	take_ownership=True)
  File "/usr/local/lib/python2.7/dist-packages/stem/process.py", line 285, in launch_tor_with_config
	return launch_tor(tor_cmd, args, torrc_path, completion_percent, init_msg_handler, timeout, take_ownership)
  File "/usr/local/lib/python2.7/dist-packages/stem/process.py", line 153, in launch_tor
	raise OSError('Process terminated: %s' % last_problem)
OSError: Process terminated: Failed to bind one of the listener ports.

johnfelipe avatar Apr 03 '18 05:04 johnfelipe

anyone?

johnfelipe avatar Apr 05 '18 16:04 johnfelipe

First thx for this script, buit its the same here, can you update for a working version ?

Best regards.

m333w avatar Apr 17 '18 21:04 m333w

I've got the same error. Does someone know where it comes from?

mathislinger avatar Apr 24 '18 18:04 mathislinger

no sorry

m333w avatar Apr 24 '18 18:04 m333w

I faced the same problem. You just need to enable control port in

/etc/tor/torrc

lukapaunovic avatar Jun 06 '18 12:06 lukapaunovic

@lukapaunovic not working for me. Can you post the actual steps/ports you used?

harm0nic avatar Jun 21 '18 21:06 harm0nic

Sorry, I have update the script, which will be easy to use now. Could you please install tor using apt-get install tor or download from here and then follow instruction in Readme.md

umarfarook882 avatar Jul 17 '18 14:07 umarfarook882

@harm0nic just enable the control port.... uncomment it or add it to the end of a file /etc/tor/torrc ControlPort 9051

lukapaunovic avatar Jul 17 '18 16:07 lukapaunovic

First you need to install support libs. (like torrequests).

for WINDOWS OS you need to install TorBrowser from TorBrowser

1.Install it and copy PATH=C:\Users\nakul\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe. (I installed it on desktop you copy your location)

  1. Open process.py file C:\Python27\Lib\site-packages\stem\process.py

  2. Goto line no. 204(change 'tor' to '..\tor'.exe path)

Code Before: def launch_tor_with_config(config, tor_cmd = 'tor', completion_percent = 100, init_msg_handler = None, timeout = DEFAULT_INIT_TIMEOUT, take_ownership = False, close_output = True):

Code After Update: def launch_tor_with_config(config, tor_cmd = 'C:\Users\nakul\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe', completion_percent = 100, init_msg_handler = None, timeout = DEFAULT_INIT_TIMEOUT, take_ownership = False, close_output = True):

It working for me, best of luck.

nakulmole avatar Aug 04 '19 20:08 nakulmole

First you need to install support libs. (like torrequests).

for WINDOWS OS you need to install TorBrowser from TorBrowser

1.Install it and copy PATH=C:\Users\nakul\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe. (I installed it on desktop you copy your location)

  1. Open process.py file C:\Python27\Lib\site-packages\stem\process.py
  2. Goto line no. 204(change 'tor' to '..\tor'.exe path)

Code Before: def launch_tor_with_config(config, tor_cmd = 'tor', completion_percent = 100, init_msg_handler = None, timeout = DEFAULT_INIT_TIMEOUT, take_ownership = False, close_output = True):

Code After Update: def launch_tor_with_config(config, tor_cmd = 'C:\Users\nakul\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe', completion_percent = 100, init_msg_handler = None, timeout = DEFAULT_INIT_TIMEOUT, take_ownership = False, close_output = True):

It working for me, best of luck.

I followed your steps exactly but still not working

Arun-Josh avatar Feb 24 '20 13:02 Arun-Josh