Open EricDeiman opened 1 month ago
I've also found the following message in the log that might be relevant:
/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/gpt_resume_job_description.py:183: LangChainDeprecationWarning: The class OpenAIEmbeddings
was deprecated in LangChain 0.0.9 and will be removed in 0.3.0. An updated version of the class exists in the langchain-openai package and should be used instead. To use it run pip install -U langchain-openai
and import as from langchain_openai import OpenAIEmbeddings
.
self.llm_embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key)
/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/gpt_resume_job_description.py:119: LangChainDeprecationWarning: The method BaseChatModel.__call__
was deprecated in langchain-core 0.1.7 and will be removed in 1.0. Use invoke instead.
reply = self.llm(messages)
having this same issue but with Gemini.
having this same issue but with Gemini.
Same here I am having the same error AttributeError: 'LoggerChatModel' object has no attribute 'logger' I am using gemini model
having this same issue but with Gemini.
Me too I'm using Gemini
Same with Ollama, also tried open AI
Describe the bug
I'm a new user, using OpenAI. When the system attempts to generate a resume, I get the message in the title, src.aihawk_easy_applier:_create_and_upload_resume:470 - Failed to generate resume: 'LoggerChatModel' object has no attribute 'logger'
Steps to reproduce
I don't know what steps to list here. The program seems to be working correctly, except for this message.
Expected behavior
A resume would be generated and submitted.
Actual behavior
The error listed in the title is generated.
Branch
main
Branch name
No response
Python version
Python 3.12.6 (64-bit)
LLM Used
OpenAI
Model used
GPT-4o
Additional context
I updated the program from GitHub today just before running it and getting the error. Full error message and traceback
2024-10-14 14:29:34.082 | ERROR | src.aihawk_easy_applier:_create_and_upload_resume:470 - Failed to generate resume: 'LoggerChatModel' object has no attribute 'logger'
2024-10-14 14:29:34.083 | ERROR | src.aihawk_easy_applier:_create_and_upload_resume:472 - Traceback: Traceback (most recent call last):
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/gpt_resume_job_description.py", line 119, in call
reply = self.llm(messages)
^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/_api/deprecation.py", line 180, in warning_emitting_wrapper
return wrapped(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/language_models/chat_models.py", line 1016, in call
generation = self.generate(
^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/language_models/chat_models.py", line 634, in generate
raise e
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/language_models/chat_models.py", line 624, in generate
self._generate_with_cache(
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/language_models/chat_models.py", line 846, in _generate_with_cache
result = self._generate(
^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_openai/chat_models/base.py", line 589, in _generate
response = self.client.create(payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/openai/_utils/_utils.py", line 277, in wrapper
return func(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/openai/resources/chat/completions.py", line 646, in create
return self._post(
^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/openai/_base_client.py", line 1266, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/openai/_base_client.py", line 942, in request
return self._request(
^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/openai/_base_client.py", line 1046, in _request
raise self._make_status_error_from_response(err.response) from None
openai.PermissionDeniedError: Error code: 403 - {'error': {'message': 'Project
proj_UxbskWFtyHrSXXRksOnvCH1K
does not have access to modelgpt-4o-mini
', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/eric/projects/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 "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/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 "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/resume_generator.py", line 37, in create_resume_job_description_text
gpt_answerer.set_job_description_from_text(job_description_text)
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/gpt_resume_job_description.py", line 247, in set_job_description_from_text
output = chain.invoke({"text": job_description_text})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/runnables/base.py", line 2878, in invoke
input = context.run(step.invoke, input, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/runnables/base.py", line 4474, in invoke
return self._call_with_config(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/runnables/base.py", line 1785, in _call_with_config
context.run(
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/runnables/config.py", line 398, in call_func_with_variable_args
return func(input, kwargs) # type: ignore[call-arg]
^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/runnables/base.py", line 4330, in _invoke
output = call_func_with_variable_args(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/langchain_core/runnables/config.py", line 398, in call_func_with_variable_args
return func(input, kwargs) # type: ignore[call-arg]
^^^^^^^^^^^^^^^^^^^^^
File "/home/eric/projects/Auto_Jobs_Applier_AIHawk/virtual/lib/python3.12/site-packages/lib_resume_builder_AIHawk/gpt_resume_job_description.py", line 133, in call
self.logger.error(f"Unexpected error occurred: {str(e)}, retrying in {retry_delay} seconds... (Attempt {attempt + 1}/{max_retries})")
^^^^^^^^^^^
AttributeError: 'LoggerChatModel' object has no attribute 'logger'
2024-10-14 14:29:34.083 | ERROR | src.aihawk_easy_applier:fill_up:337 - Failed to find form elements: 'LoggerChatModel' object has no attribute 'logger'