feder-cr / linkedIn_auto_jobs_applier_with_AI

LinkedIn_AIHawk is a tool that automates the jobs application process on LinkedIn. Utilizing artificial intelligence, it enables users to apply for multiple job offers in an automated and personalized way.
MIT License
11.95k stars 1.86k forks source link

Education Section Breaking Resume Generation #178

Closed acortiv closed 1 week ago

acortiv commented 2 weeks ago

any idea what this is from:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\src\linkedIn_easy_applier.py", line 63, in job_apply self._fill_application_form(job) File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\src\linkedIn_easy_applier.py", line 129, in _fill_application_form self.fill_up(job) File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\src\linkedIn_easy_applier.py", line 173, in fill_up self._process_form_element(element, job) File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\src\linkedIn_easy_applier.py", line 177, in _process_form_element self._handle_upload_fields(element, job) File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\src\linkedIn_easy_applier.py", line 194, in _handle_upload_fields self._create_and_upload_resume(element, job) File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\src\linkedIn_easy_applier.py", line 210, in _create_and_upload_resume raise Exception(f"Upload failed: \nTraceback:\n{tb_str}") Exception: Upload failed: Traceback: Traceback (most recent call last): File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\src\linkedIn_easy_applier.py", line 204, in _create_and_upload_resume f.write(base64.b64decode(self.resume_generator_manager.pdf_base64(job_description_text=job.description))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\virtual\Lib\site-packages\lib_resume_builder_AIHawk\manager_facade.py", line 78, in pdf_base64 self.resume_generator.create_resume_job_description_text(style_path, job_description_text, temp_html_path) File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\virtual\Lib\site-packages\lib_resume_builder_AIHawk\resume_generator.py", line 38, in create_resume_job_description_text self._create_resume(gpt_answerer, style_path, temp_html_path) File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\virtual\Lib\site-packages\lib_resume_builder_AIHawk\resume_generator.py", line 19, in _create_resume message = template.substitute(markdown=gpt_answerer.generate_html_resume(), style_path=style_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tacor\smd-jobs\LinkedIn_AIHawk_automatic_job_application\virtual\Lib\site-packages\lib_resume_builder_AIHawk\gpt_resume_job_description.py", line 323, in generate_html_resume f" {results['education']}\n"


KeyError: 'education'
jayanth-kumar-morem commented 2 weeks ago

@acortiv any fix ?

acortiv commented 2 weeks ago

No, it has to do with the way the prompts are being passed to the OAI API. It goes section by section for the autogenerated resume and it is caching the values for the wrong key somewhere along the way (ie. Work Experience info will be passed as the Education section in the prompt). It repeats this and each section gets pushed down one value respectively. To dumb it down if you think of a Python Dict., the values for the keys are getting i++'d. I'm out camping with my gf & her fam rn, so I probably won't get around to finding a fix until tmrw. In the meantime, I think the string values in YAML need to be under a certain character limit as GPT seems very particular abt that for some reason. Some kind of denouncing might need to be added in as well as OAI likes to rate-limit the consecutive requests when generating the resume. I could see response from the rate limit unintentionally being parsed and causing this problem. I'm running this on my windows OS with a venv. That being said if you have similar problems I'd throw it in a docker container and use a Linux distro to see if things change any.

feder-cr commented 1 week ago

@jayanth-kumar-morem @acortiv im working on this

feder-cr commented 1 week ago

join the telegram group, so we can discuss it more easily - > https://t.me/AIhawkCommunity