I am trying to open a tor browser window on ubuntu with python using selenium and then control it so that it goes to a link, puts in some key combinations, etc. when my code goes to open tor, it gives me a pop up saying "Unable to start tor, the torrc file is missing and could not be created" and then proceeds to hand on a tor window saying "waiting for Tor to start". I haven't even included the rest of the code yet for doing some actions on the web page because tor won't even open to begin with. the folder and file used by the tor browser as well as the torrc file (which does exist!) in /etc/tor all have full permissions for all users. This is the simple code that I am trying to run yet I'm getting the above error:
from selenium import webdriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.common.proxy import Proxy, ProxyType
from selenium.webdriver.firefox.options import Options
import os
binary = FirefoxBinary('/home/test/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/firefox')
driver = webdriver.Firefox(firefox_binary = binary)
driver.get("https://www.whatsmyip.org")