Closed Botmakingisafunsport closed 2 years ago
Try running this command : pip install selenium==3.141.0 Then try to run the script again. If this still doesn't work, you might be using the wrong version of the chrome driver. The chrome driver version must be the same as your google chrome browser. And if none of the above is working, please tell so I can try to solve the error you're getting.
no response, issue will be closed
Receiving similar error.
Have ChromeDriver executable file in the Bot folder.
When running the bot, am prompted to enter which service is required. Upon entering number, receive error
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/hungrybear/Desktop/Bots/TikTok-Bot-main/chromedriver.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/hungrybear/Desktop/Bots/TikTok-Bot-main/tiktok-bot.py", line 182, in <module>
driver = webdriver.Chrome(PATH)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
ChromeDriver version is 96 but Chrome is 97.
brew install --cask chromedriver@97.0.4692.71
Cask 'chromedriver@97.0.4692.71' is unavailable: No Cask with this name exists.
Thanks for your help
HB
Hello! Thank you for sharing the issue. So the script is running fine on my local machine, so lets try to find a solution for you. First, be sure that your chromedriver is the same version of your chrome browser. Then, on line 181, replace PATH = os.getcwd() + "/chromedriver.exe"
with PATH = "./chromedriver.exe"
, save the file and rerun the script. If this still doesn't work, send me a screenshot of your installation directory, and I'll be working on another solution.
Got it to work, however the likes to the hearts on the video did not increase.
Great to hear. Well for the likes, that would be a zefoy problem, I can't control that.
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py", line 76, in start stdin=PIPE) File "/usr/lib/python3.6/subprocess.py", line 729, in init restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: '/home/anonym/TikTok-Bot/chromedriver.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "tiktok-bot.py", line 182, in
driver = webdriver.Chrome(PATH)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init
self.service.start()
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home