Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom tor build #191

Closed
f-tepel opened this issue Jul 7, 2023 · 1 comment
Closed

Use custom tor build #191

f-tepel opened this issue Jul 7, 2023 · 1 comment

Comments

@f-tepel
Copy link

f-tepel commented Jul 7, 2023

Hi,

I compiled my own tor browser because I want to change some settings. Currently I did not change anything but just build the most current branch.

When trying to connect to it with this package I got the error:

Traceback (most recent call last):
  File "/home/felix/Documents/selenium/main.py", line 6, in <module>
    tor_process = launch_tbb_tor_with_stem(tbb_path=tbb_dir)
  File "/home/felix/.local/lib/python3.10/site-packages/tbselenium/utils.py", line 85, in launch_tbb_tor_with_stem
    raise StemLaunchError("Invalid Tor binary")
tbselenium.exceptions.StemLaunchError: Invalid Tor binary

I know this might not be the right place to ask but I was thinking maybe somebody knows something about this here.

@f-tepel f-tepel changed the title use custom tor build Use custom tor build Jul 7, 2023
@gunesacar
Copy link
Collaborator

The error means the tbselenium cannot find the tor binary in the expected location:

if not tor_binary and tbb_path:
tor_binary = join(tbb_path, cm.DEFAULT_TOR_BINARY_PATH)
if not isfile(tor_binary):
raise StemLaunchError("Invalid Tor binary")

If you are building Tor Browser yourself, I'd make sure to mirror the directory structure of Tor Browser Bundle.
Alternatively, you can start tbselenium with system Tor, so you don't have to deal with launching it with Stem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants