denglab / SeqSero2

SeqSero2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seroseq2 not usable if path includes whitespaces

nsmro opened this issue · comments

If the absolute path of the SeroSeq script include whitespaces, Seroseq raises an error

Case in point:
/bin/sh: 1: /XXX/XXX/XXX/XXX/seq: not found
Traceback (most recent call last):
File "/XXX/XXX/XXX/XXX/seq sero2/SeqSero2/bin/SeqSero2_package.py", line 1657, in
main()
File "/genStorage02/NRB/Reveal/2023_08_salmonella/seq sero2/SeqSero2/bin/SeqSero2_package.py", line 1369, in main
subprocess.check_call(dirpath+"/SeqSero2_package.py -h",shell=True)#change name of python file
File "/XXXX/apps/python/3.10.6/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/XXX/XXX/XXX/XXX/seq sero2/SeqSero2/bin/SeqSero2_package.py -h' returned non-zero exit status 127.

Maybe something along the lines of the following might circumvent this issue:
subprocess.check_call('"' + dirpath+' /SeqSero2_package.py -h' + '"',shell=True)