Jobs_Applier_AI_Agent icon indicating copy to clipboard operation
Jobs_Applier_AI_Agent copied to clipboard

Bug: chromedriver.exe Hardcoded in site-packages/lib_resume_builder_AIHawk/utils.py Causes Compatibility Issues on macOS

Open udaylunawat opened this issue 5 months ago • 2 comments

Bug: chromedriver.exe Hardcoded in lib_resume_builder_AIHawk/utils.py Causes Compatibility Issues on macOS

Description:

The current implementation of the create_driver_selenium() function in lib_resume_builder_AIHawk/utils.py contains the following line:

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

This hardcodes the ChromeDriver path to the .exe extension, which causes compatibility issues on macOS, as .exe files are specific to Windows.

Steps to Reproduce:

  1. Clone the repository on a macOS system.
  2. Run the application.
  3. Observe that the application fails to initialize ChromeDriver due to the .exe path being used.

Expected Behavior:

The application should work across different operating systems, including macOS, without requiring manual intervention to change the file extension.

Actual Behavior:

The application crashes on macOS because it cannot find or execute chromedriver.exe.

Proposed Fix:

The line:

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

was replaced with:

chromedriver_path = ChromeDriverManager().install()

This allows webdriver-manager to dynamically fetch the appropriate ChromeDriver for the user's operating system, ensuring compatibility across platforms.

Suggested Change:

Replace the hardcoded path with ChromeDriverManager().install() to make the application OS-agnostic.

Additional Context:

This change was made and tested on macOS, resolving the issue.

udaylunawat avatar Sep 19 '24 19:09 udaylunawat