join_paired_ends.py: error: option -f: file does not exist
Steven D'Aprano
steve at pearwood.info
Thu Apr 7 08:51:02 EDT 2016
On Thu, 7 Apr 2016 08:07 pm, Inya Ivano wrote:
> Hi,
>
> I've been having trouble with running my files:
>
>>join_paired_ends.py -f
>>/home/qiime/Documents/Aleurone/1101-Pl1-A1_S193_L001_R2_001.fastq.gz -r
>>/home/qiime/Documents/Aleurone/1101-Pl1-A1_S193_L001_R1_001.fastq.gz -o
>>/home/qiime/Documents/Aleurone/Joined_1101
>
>>join_paired_ends.py: error: option -f: file does not exist:
>>'/home/qiime/Documents/Aleurone/1101-Pl1-A1_S193_L001_R2_001.fastq.gz'
Does that file actually exist? What happens if you run:
ls -l /home/qiime/Documents/Aleurone/1101-Pl1-A1_S193_L001_R2_001.fastq.gz
or the equivalent for whatever operating system you are running?
(I'm guessing you're using some sort of Linux or Unix.)
> What I'm not sure about is whether there's a problem with the script or
> the virtualmachine settings, I'm using the latest Oracle VM VirtualBox
> version 5.0.16 edition.
To start with, you should try to get an traceback showing the *actual*
error. It looks like your script join_paired_ends.py catches the exception
and replaces the useful exception with a possibly misleading generic error
message. If the script does anything like this:
try:
open(thefile) ...
except Exception:
print("file does not exist")
sys.exit()
then you are making life harder for yourself by suppressing the real error
and replacing it with a generic and probably incorrect error message.
--
Steven
More information about the Python-list
mailing list