Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP WANTED]: <Errno2 during job application: No such file or directory: 'data_folder\\output\\failed.json'> #682

Open
LouisLeBoeuf opened this issue Oct 30, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@LouisLeBoeuf
Copy link

Issue description

Everything works until it attempts to apply to a job, then I ger the following error:

2024-10-30 12:47:20.673 | DEBUG | src.aihawk_job_manager:extract_job_information_from_tile:459 - Job information extracted: Senior Quality Engineer at Brightpath Associates LLC
2024-10-30 12:47:20.694 | DEBUG | src.aihawk_job_manager:apply_jobs:310 - Starting applicant for job: Fire Protection Engineer at Insight Global
2024-10-30 12:47:20.694 | ERROR | src.aihawk_job_manager:start_applying:158 - Error during job application: [Errno 2] No such file or directory: 'data_folder\output\failed.json'

Specific tasks

No response

Additional resources

No response

Additional context

No response

@LouisLeBoeuf LouisLeBoeuf added the help wanted Extra attention is needed label Oct 30, 2024
@roshangeorge97
Copy link

same++

@LouisLeBoeuf
Copy link
Author

Same++

@roshangeorge97
Copy link

found a fix..

replace this:

def is_previously_failed_to_apply(self, link):
    file_name = "failed"
    file_path = self.output_file_directory / f"{file_name}.json"
    if not file_path.exists():
        with open(file_path, "w", encoding="utf-8") as f:
            json.dump([], f)
    with open(file_path, 'r', encoding='utf-8') as f:
        try:
            existing_data = json.load(f)
        except json.JSONDecodeError:
            logger.error(f"JSON decode error in file: {file_path}")
            return False
        
    for data in existing_data:
        data_link = data['link']
        if data_link == link:
            return True
            
    return False

with the existing, is_previously_failed_to_apply(self, link) function in the src/aihawk_job_manager.py file

@FrancescoVassalli
Copy link

There is a software fix for this in the works but for now you can also just create the file manually and write [] inside

@FrancescoVassalli
Copy link

This should be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants