wodsuz / EasyApplyJobsBot

A python bot to automatically apply all Linkedin,Glassdoor, etc Easy Apply jobs based on your preferences. Auto login, auto fill additional questions, apply automatically!
https://www.automated-bots.com/
Other
424 stars 141 forks source link

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot create default profile directory #34

Closed StellaaaMing closed 9 months ago

StellaaaMing commented 1 year ago

I have upgrade my python and pip, and after I run python3.10 linkedin.py this is error that I received. Please advice on anysteps I am missing or how can I fix this issue. Thank you so much!

python3.10 linkedin.py 🌐 Bot will run in Chrome browser and log in Linkedin for you. [WDM] - Downloading: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 8.04M/8.04M [00:00<00:00, 13.7MB/s] Traceback (most recent call last): File "/Users/myu/Desktop/github/EasyApplyJobsBot/linkedin.py", line 245, in Linkedin().linkJobApply() File "/Users/myu/Desktop/github/EasyApplyJobsBot/linkedin.py", line 15, in init self.driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()),options=utils.chromeBrowserOptions()) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 80, in init super().init( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 104, in init super().init( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 286, in init self.start_session(capabilities, browser_profile) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 378, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute self.error_handler.check_response(response) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot create default profile directory Stacktrace: 0 chromedriver 0x0000000104e4d670 chromedriver + 4298352 1 chromedriver 0x0000000104e45bbc chromedriver + 4266940 2 chromedriver 0x0000000104a78758 chromedriver + 280408 3 chromedriver 0x0000000104aa2258 chromedriver + 451160 4 chromedriver 0x0000000104a9e2c8 chromedriver + 434888 5 chromedriver 0x0000000104a9c308 chromedriver + 426760 6 chromedriver 0x0000000104adc994 chromedriver + 690580 7 chromedriver 0x0000000104adc114 chromedriver + 688404 8 chromedriver 0x0000000104aa62d0 chromedriver + 467664 9 chromedriver 0x0000000104aa7354 chromedriver + 471892 10 chromedriver 0x0000000104e0d6c4 chromedriver + 4036292 11 chromedriver 0x0000000104e11c64 chromedriver + 4054116 12 chromedriver 0x0000000104e182d8 chromedriver + 4080344 13 chromedriver 0x0000000104e12970 chromedriver + 4057456 14 chromedriver 0x0000000104de98dc chromedriver + 3889372 15 chromedriver 0x0000000104e3125c chromedriver + 4182620 16 chromedriver 0x0000000104e313b4 chromedriver + 4182964 17 chromedriver 0x0000000104e400f4 chromedriver + 4243700 18 libsystem_pthread.dylib 0x00000001939ac26c _pthread_start + 148 19 libsystem_pthread.dylib 0x00000001939a708c thread_start + 8

richardycao commented 1 year ago

Try commenting out options.add_argument("--profile-directory=" +profileDir) on line 23 in utils.py. I had a similar error that I fixed by commenting out line 22, but line 23 seems more relevant for your case.

StellaaaMing commented 1 year ago

Thank you so much for your suggestion, I have tried that but still same error raised in selenium

Wilson-D-Lee commented 1 year ago

I'm getting the same issue and the same response unfortunately 😭 has anyone figured this one out?

rexsphere commented 1 year ago

I used default options and it worked

options = webdriver.ChromeOptions()

commented whole option arguments

Wilson-D-Lee commented 1 year ago

Where do I make the update? what line and page?

nitishdas1517 commented 1 year ago

in utils.py, now I am able to login and apply.


        options = webdriver.ChromeOptions()
        # initialPath = config.chromeProfilePath[0:config.chromeProfilePath.rfind("/")]
        # profileDir = config.chromeProfilePath[config.chromeProfilePath.rfind("/")+1:]
        # options.add_argument('--user-data-dir=' +initialPath)
        options.add_argument("--profile-directory=Default")
        options.add_argument("--incognito")```
Wilson-D-Lee commented 1 year ago

You're a legend!!!! it works now thank you.

casnz1601 commented 1 year ago

in utils.py, now I am able to login and apply.

        options = webdriver.ChromeOptions()
        # initialPath = config.chromeProfilePath[0:config.chromeProfilePath.rfind("/")]
        # profileDir = config.chromeProfilePath[config.chromeProfilePath.rfind("/")+1:]
        # options.add_argument('--user-data-dir=' +initialPath)
        options.add_argument("--profile-directory=Default")
        options.add_argument("--incognito")```
def chromeBrowserOptions():
    options = webdriver.ChromeOptions()
    options.add_argument("--profile-directory=Default")
    options.add_argument("--incognito")
    return options