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

OSError: [Errno 39] Directory not empty: '5_final_blast' #112

Open
eam12 opened this issue Jan 19, 2022 · 4 comments
Open

OSError: [Errno 39] Directory not empty: '5_final_blast' #112

eam12 opened this issue Jan 19, 2022 · 4 comments
Assignees
Labels
Status: In Progress Has been assigned and is being worked on.

Comments

@eam12
Copy link

eam12 commented Jan 19, 2022

I'm using version 2.8.5 of chewBBACA (installed via Conda) and am encountering the following error when I run chewBBACA.py CreateSchema:

Performing final BLASTp...
[====================] 100%
Removed 2 sequences that were highly similar to other sequences.
Traceback (most recent call last):
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/bin/chewBBACA.py", line 10, in
sys.exit(main())
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/lib/python3.9/site-packages/CHEWBBACA/chewBBACA.py", line 1480, in main
functions_info[process]1
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/lib/python3.9/site-packages/CHEWBBACA/utils/process_datetime.py", line 149, in wrapper
func(*args, **kwargs)
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/lib/python3.9/site-packages/CHEWBBACA/chewBBACA.py", line 193, in create_schema
CreateSchema.main(**vars(args))
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/lib/python3.9/site-packages/CHEWBBACA/createschema/CreateSchema.py", line 1201, in main
fo.delete_directory(results[1])
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/lib/python3.9/site-packages/CHEWBBACA/utils/file_operations.py", line 168, in delete_directory
shutil.rmtree(directory_path)
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/lib/python3.9/shutil.py", line 727, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/lib/python3.9/shutil.py", line 668, in _rmtree_safe_fd
onerror(os.rmdir, fullname, sys.exc_info())
File "/home/johnsont/shared/.conda/envs/chewbbaca_2.8.5/lib/python3.9/shutil.py", line 666, in _rmtree_safe_fd
os.rmdir(entry.name, dir_fd=topfd)
OSError: [Errno 39] Directory not empty: '5_final_blast'

I assume this is a bug during intermediate file removal as the error does not occur when I include the --no-cleanup flag.

Thank you so much for creating such a useful tool!

@rfm-targa rfm-targa self-assigned this Jan 19, 2022
@rfm-targa rfm-targa added the Status: In Progress Has been assigned and is being worked on. label Jan 19, 2022
@rfm-targa
Copy link
Contributor

Hello @eam12,

Thank you for your interest in chewBBACA. We have never encountered that error while testing/running chewBBACA. It is raised by the shutil package and I do not think that it is being caused by a bug in chewBBACA. This error might be raised if you do not have sufficient permissions. Can you please check that you have sufficient permissions to delete the folder that has the intermediate files? Also, you may have problems if you are trying to modify the contents of the folder while also trying to delete it (I think this is not the case, but please check if there is a running process that might be interfering).
Please let us know if these suggestions help solve the issue.

Rafael

@saramonzon
Copy link

Hi! @rfm-targa I'm having the same issue here and the permissions look good

drwxrwsr-x 2 smonzon bi 16K Feb 18 14:41 5_final_blast

@rfm-targa
Copy link
Contributor

Hello @saramonzon,

Thank you for reporting this issue. Please check the permissions of the files inside that folder. It is possible that some files are marked as read-only and that might lead to that error. If the issue is not related with that, the best option might be to use the --no-cleanup flag to avoid that error. We cannot reproduce this error, but we will include a solution to circumvent this issue in a future release.

Rafael

@saramonzon
Copy link

It's weird because the directory is empty, I have used the --no-cleanup option and it worked fine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress Has been assigned and is being worked on.
Projects
None yet
Development

No branches or pull requests

3 participants