# HG changeset patch # User linda-bakker # Date 1519131587 18000 # Node ID 2ab40f9266e41b64cba6f41090b86685ed480de7 # Parent bee03dc123f2123eaa799c680e4d122e9da4da99 An update to the core of galaxy prevents the way the code is trying to write files. This patch fixes this. diff -r bee03dc123f2 -r 2ab40f9266e4 rankfilter_GCMS/nistpdf_to_tabular.py --- a/rankfilter_GCMS/nistpdf_to_tabular.py Tue Feb 20 07:29:49 2018 -0500 +++ b/rankfilter_GCMS/nistpdf_to_tabular.py Tue Feb 20 07:59:47 2018 -0500 @@ -15,8 +15,9 @@ """ -import sys +import sys,os import pdfread +import tempfile from subprocess import call # NB: THIS TOOL SHOULD BE DEPRECATED ONCE NIST-Wrapper tool is stable and released. NIST-Wrapper tool already produces the necessary tabular file. @@ -40,6 +41,8 @@ if __name__ == '__main__': - pdf_as_text = sys.argv[1]+".txt" + #pdf_as_text = sys.argv[1]+".txt" + pdf_as_text = tempfile.mkstemp()[1] convert_pdftotext(sys.argv[1], pdf_as_text) pdfread.convert_pdftotext2tabular(pdf_as_text, sys.argv[2], sys.argv[3], False) + os.remove(pdf_as_text)