I am developing a script that creates 3 Tor instances using stem, from stem tutorial "to Russia with love".
def print_bootstrap_lines(line):
if "Bootstrapped " in line:
print(term.format(line, term.Color.BLUE))
def main():
SocksPort=9050
#print(str(SocksPort))
i=0
while i<2:
tor_process=stem.process.launch_tor_with_config(
config={
'SocksPort':str(SocksPort),
'ControlPort':str(SocksPort+1),
'ExitNodes':'{ru}',
'StrictNodes':'1',},
init_msg_handler=print_bootstrap_lines,
)
SocksPort=SocksPort+2
i=i+1
after the creation of the first instance, a return error is printed:
OSError: Process terminated: No, it's still there. Exiting.