Questions tagged [stem]

Stem is a Python controller library for Tor.

Stem is a Python controller library that allows applications to interact with Tor (https://www.torproject.org/).

For tutorials and API documentation see stem’s homepage.

Quick Start

To install you can either use…

pip install stem

… or install from the source tarball. Stem supports both the python 2.x and 3.x series. To use its python3 counterpart you simply need to install using that version of python.

python3 setup.py install

After that, give some tutorials a try! For questions or to discuss project ideas we’re available on irc and the tor-dev@ email list.

104 questions
14
votes
1 answer

Elasticsearch match with stemming

How do I do a search for a stemmed match? I.e. at the moment I have many documents that contain the word "skateboard" in the item_title field, but only 3 documents that contain the word "skateboards". Because of this, when I do the following…
user1950164
8
votes
2 answers

Figure object have no attribute set_title

I have used stem_graphic to plot a stem and leaf plot and saved it to pdf but when trying to enter title its giving error: Figure object have no attribute set_title. ax, b=stem_graphic(mileage['disp']) ax.set_title("Vicky") This is the…
Vicky Choudhary
  • 81
  • 1
  • 1
  • 2
7
votes
1 answer

How to control stem markers size in matplotlib?

In How to make thicker stem lines in matplolib there is a description of how to control the width of stem lines. But how to control the size of the stem markers?
jason
  • 181
  • 1
  • 5
7
votes
4 answers

Tor failing to run with Failed to bind one of the listener ports

When I run the [example][1] from the stem documentation i get the error: OSError: Process terminated: Failed to bind one of the listener ports. The exact code that I am running is below: import socks import socket import stem.process import…
Preston
  • 7,399
  • 8
  • 54
  • 84
7
votes
2 answers

Getting Tor ControlPort to work

I have installed Tor to run as a service on my windows machine and I am trying to make requests in python through the Stem package. In my torrc file I have specified ControlPort as 9051 and set a HashedControlPassword. When I run netstat, I see that…
Einstein
  • 431
  • 1
  • 5
  • 12
7
votes
2 answers

How to connect to Tor control port (9051) from a remote host?

I'm trying to connect to control port (9051) of tor from a remote machine using stem python library. dum.py from stem import Signal from stem.control import Controller def set_new_ip(): """Change IP using TOR""" with…
jaggi
  • 357
  • 1
  • 4
  • 17
6
votes
3 answers

"Error while receiving a control message (SocketClosed): empty socket content" in Tor's stem controller

I'm working on a scraper which uses Tor, of which a simplified version is in this example project: https://github.com/khpeek/scraper-compose. The project has the following (simplified) structure: . ├── docker-compose.yml ├── privoxy │   ├──…
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
5
votes
1 answer

Stem is giving the "Unable to connect to port 9051" error

I tried this example: import getpass import sys import stem import stem.connection from stem.control import Controller if __name__ == '__main__': try: controller = Controller.from_port() except stem.SocketError as exc: print("Unable…
QPTR
  • 1,620
  • 7
  • 26
  • 47
5
votes
2 answers

Tor Stem - To Russia With Love Connection Issues

I am trying to get the To Russia With Love tutoial from the Stem project working. from io import StringIO import socket import urllib3 import time import socks # SocksiPy module import stem.process from stem.util import term SOCKS_PORT =…
Steve-O
  • 387
  • 1
  • 4
  • 10
4
votes
1 answer

Is it possible to speed up the changing of IP addresses when using theStem package in Python via Tor?

I am currently using the following set-up to change my ip address in Mac OS X: from stem import Signal from stem.control import Controller with Controller.from_port(port = 9051) as controller: controller.authenticate() …
user321627
  • 2,350
  • 4
  • 20
  • 43
3
votes
3 answers

python nltk -- stemming list of sentences/phrases

I have bunch of sentences in a list and I wanted to use nltk library to stem it. I am able to stem one sentence at a time, however I am having issues stemming sentences from a list and joining them back together. Is there a step I am missing? Quite…
sharp
  • 2,140
  • 9
  • 43
  • 80
3
votes
3 answers

"No module named 'stem'" in Python3 on macOS

Apologies for the noob question. I am trying to run a script which uses the stem module. However, whenever I run it, I get the warning "ModuleNotFoundError: No module named 'stem'" Even when I use Python3 in terminal this issues occurs from simply…
E. Hen
  • 31
  • 1
  • 3
3
votes
1 answer

Extend baseline of stem plot in matplotlib to axis limits

How can I make the baseline extend to the axis limits instead of ending with the last data points when generating a stem plot with matplotlib?
jboss
  • 33
  • 4
3
votes
1 answer

Authenticating a Controller with a Tor subprocess using Stem

I am trying to launch a new tor process (no tor processes currently running on the system) using a 'custom' config by using stems launch_tor_with_config. I wrote a function that will successfully generate and capture a new hashed password. I then…
s4w3d0ff
  • 1,091
  • 10
  • 24
2
votes
1 answer

TOR Stem not finding the cookie control authentication file

I'm using Windows 10. I have Tor Win32 Service actively running. Here is my torrc file from C:...\Tor Browser\Browser\TorBrowser\Data\Tor\torrc ControlPort 9051 CookieAuthentication 1 CacheDirectoryGroupReadable 1 Here is my python 3.9 code: from…
Shaun Overton
  • 601
  • 1
  • 9
  • 16
1
2 3 4 5 6 7