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

FileNotFoundError for temp.txt #45

Closed
sweramesh opened this issue Mar 23, 2020 · 1 comment
Closed

FileNotFoundError for temp.txt #45

sweramesh opened this issue Mar 23, 2020 · 1 comment

Comments

@sweramesh
Copy link

I am using Snakemake and enaDataGet to download several fastq files concurrently from a project (namely PRJEB9586) instead of using enaGroupGet. However I get the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'PRJEB9586/temp.txt'

I believe this is the block of code from python3/readGet.py that messes things up:

temp_file = os.path.join(dest_dir, 'temp.txt')
utils.download_report_from_portal(search_url, temp_file)
f = open(temp_file)
lines = f.readlines()
f.close()
os.remove(temp_file)

Because my Snakemake pipeline is running concurrently, there are several processes creating and deleting this temp.txt file, which is causing the error. Can this be fixed, possibly by using Python's tempfile library?

@suranjayathilaka
Copy link
Contributor

Thanks for using enaBrowserTools. Changed to not use temp files in this context. Let me know if you face any problems.

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

No branches or pull requests

2 participants