NathanDuma / LinkedIn-Easy-Apply-Bot

Automate LinkedIn Easy Apply job applications and answer application-specific questions.
226 stars 86 forks source link

Throws error after applying to one job #2

Closed millysecurity closed 2 years ago

millysecurity commented 3 years ago

Applies to one job then after it's finished it throws back

Could not apply to the job!
Traceback (most recent call last):
  File "C:\Users\ex\Documents\resumes\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 167, in apply_jobs
    job_el = job_tile.find_element_by_class_name('job-card-list__title')
  File "C:\Users\ex\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 398, in find_element_by_class_name
    return self.find_element(by=By.CLASS_NAME, value=name)
  File "C:\Users\ex\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 659, in find_element
    {"using": by, "value": value})['value']
  File "C:\Users\ex\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
  File "C:\Users\ex\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\ex\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
NathanDuma commented 3 years ago

Can you please reproduce the issue and post the linkedin URL here? The error means that the page has changed, either a refresh, or the page changed somehow. If you could give more details on what you saw, that could help.