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

Fix issue 269, deleting pre-existing files error #271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

han-so1omon
Copy link

Pull Request Title

Fix issue, deleting pre-existing files error

Related Issue

#269

Description

The error arises when the user deletes the pre-existing files from Data/Resumes or Data/JobDescriptions

Type

  • Bug Fix
  • Feature Enhancement
  • Documentation Update
  • Code Refactoring
  • Other (please specify):

Proposed Changes

  • Add in a check to see if the directory exists in run_first.py
  • Make the directory if it does not exist in scripts/<ResumeProcessor.py|JobDescriptionProcessor.py>

How to Test

  1. Delete existing resumes from Data/Resumes
  2. Run python run_first.py as instructed in README

Checklist

  • The code compiles successfully without any errors or warnings
  • The changes have been tested and verified
  • The documentation has been updated (if applicable)
  • The changes follow the project's coding guidelines and best practices
  • The commit messages are descriptive and follow the project's guidelines
  • All tests (if applicable) pass successfully
  • This pull request has been linked to the related issue (if applicable)

Additional Information

The pre-commit hooks appear to be failing by default, without any modifications to the existing main branch code. As such, I complied with style using black but did not run the pre-commit hooks

Description:
The error arises when the user deletes the pre-existing files from Data/Resumes or Data/JobDescriptions

Issue:
The os.path commands from run_first.py yield FileNotFoundError on the Data/Processed/<Resumes|JobDescriptions> directories

Solution:
- Add in a check to see if the directory exists in run_first.py
- Make the directory if it does not exist in scripts/<ResumeProcessor.py|JobDescriptionProcessor.py>
@srbhr
Copy link
Owner

srbhr commented Jun 12, 2024

Thanks, @han-so1omon. I'll test this and merge it over this weekend.

@webxl
Copy link

webxl commented Aug 22, 2024

Bump

Side note: I was able to fix this just by making the folder if it didn't exist:

def remove_old_files(files_path):

    if not (os.path.isdir(files_path)):
        os.makedirs(files_path)

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants