AIHawk-co / Auto_Jobs_Applier_AI_Agent

Auto_Jobs_Applier_AI_Agent by AIHawk is an AI Agent that automates the jobs application process. Utilizing artificial intelligence, it enables users to apply for multiple jobs in an automated and personalized way.
https://aihawk.co/
Other
22.15k stars 3.25k forks source link

[BUG]: chromedriver version not found #512

Open kurosh87 opened 1 month ago

kurosh87 commented 1 month ago

Describe the bug

No response

Steps to reproduce

getting this from GPT:

The error message you’re encountering indicates a conflict between the version of selenium required by lib-resume-builder-aihawk and the version you installed.

second round:

It appears that you’re still encountering the same issue with Selenium failing to discover the correct chromedriver version. Despite having installed the correct version (Selenium 4.9.1), there might be lingering issues with the ChromeDriver setup.

024-10-10 22:50:51.175 | DEBUG | src.aihawk_easy_applier:_create_and_upload_resume:424 - Starting the process of creating and uploading resume. 2024-10-10 22:50:51.175 | DEBUG | src.aihawk_easy_applier:_create_and_upload_resume:439 - Generated file path for resume: generated_cv/CV_1728625851.pdf 2024-10-10 22:50:51.175 | DEBUG | src.aihawk_easy_applier:_create_and_upload_resume:441 - Generating resume for job: Node js Back End Developer at Readyhubb 2024-10-10 22:51:24.197 | ERROR | src.aihawk_easy_applier:_create_and_upload_resume:470 - Failed to generate resume: Message: Selenium Manager failed for: /Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json --debug. The chromedriver version cannot be discovered

2024-10-10 22:51:24.210 | ERROR | src.aihawk_easy_applier:_create_and_upload_resume:472 - Traceback: Traceback (most recent call last): File "/Users/pejman/Auto_Jobs_Applier_AIHawk/src/aihawk_easy_applier.py", line 442, in _create_and_upload_resume resume_pdf_base64 = self.resume_generator_manager.pdf_base64(job_description_text=job.description) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/manager_facade.py", line 81, in pdf_base64 pdf_base64 = HTML_to_PDF(temp_html_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 25, in HTML_to_PDF driver = create_driver_selenium() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py", line 18, in create_driver_selenium return webdriver.Chrome(service=service, options=options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 82, in init service.path = DriverFinder.get_path(service, options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 43, in get_path raise err File "/Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 40, in get_path path = shutil.which(service.path) or SeleniumManager().driver_location(options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 91, in driver_location result = self.run(args) ^^^^^^^^^^^^^^ File "/Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 112, in run raise SeleniumManagerException(f"Selenium Manager failed for: {command}.\n{result}{stderr}") selenium.common.exceptions.SeleniumManagerException: Message: Selenium Manager failed for: /Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json --debug. The chromedriver version cannot be discovered

2024-10-10 22:51:24.210 | ERROR | src.aihawk_easy_applier:fill_up:337 - Failed to find form elements: Message: Selenium Manager failed for: /Users/pejman/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json --debug. The chromedriver version cannot be discovered

2024-10-10 22:51:24.211 |

Expected behavior

No response

Actual behavior

No response

Branch

None

Branch name

No response

Python version

No response

LLM Used

No response

Model used

No response

Additional context

No response

hegdeshashank73 commented 1 month ago

Are you using linux?

RyanCwynar commented 1 month ago

I am, and I have the same issue. Using PopOS 22

nitSubedi commented 1 month ago

Had the same issue in my mac, the chromedriver manager is coded to download windows version of the chromedriver, so you could try changing the code so that it detects the platform and downloads the compatible version. That worked for my macbook so It might be worth a try. link for my issue :

nitSubedi commented 1 month ago

https://github.com/feder-cr/Auto_Jobs_Applier_AIHawk/issues/453

hydrosam commented 2 weeks ago

It looks like #453 was a distinct issue with detecting OS that got resolved. However I'm on Ubuntu 24.04.1LTS and running into the same issue so it seems like there's still something wrong in the code calling selenium on Linux.

sirraht commented 1 week ago

Same for me, I'm on Ubuntu 22.04.4 LTS. The code appears to be looking for 'chromedriver.exe'. The file on my system is called 'chromedriver'. Simply removing the '.exe' on the chromedriver filename in utils.py worked for me.

Here is the path to utils.py on my machine:

/opt/homebrew/Caskroom/miniforge/base/envs/hawk-env/lib/python3.12/site-packages/lib_resume_builder_AIHawk/utils.py

Here is that updated line in the function: create_driver_selenium(), with the '.exe' file extension removed:

chromedriver_path = os.path.join(folder, "chromedriver")