Message: unknown error: cannot connect to chrome at 127.0.0.1:55993 from chrome not reachable. pythonanywhere selenium undetected_chromedriver error

Question:

I am using selenium undetected chromedriver on pythonanywhere site.
This is the part of my code: (I removed some parts of the code)

from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import undetected_chromedriver as uc

if __name__ == '__main__':
    options = webdriver.ChromeOptions()
    options.add_argument("--start-maximized")
    options.add_argument("--disable-popup-blocking")
    driver = uc.Chrome(options=options)
    driver.get(link)

And it is causing this error:

Traceback (most recent call last): File "/home/KraKoff/CollectionFinder.py", line 36, in <module> 
driver = uc.Chrome(options=options) 
... 
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:43899 from chrome not reachable

How do I solve this error?

Asked By: KraKoff_

||

Answers:

I think it is because i used free pythonanywhere version and this page wasn`t whitelisted

Answered By: KraKoff_