# Pastebin ICW3WBZ6 def parsePdf(inPdf): print("parsePdf is being called") subprocess.Popen(['pdftotext', sys.argv[-1],'temp.txt']) with open(temp.txt) as temp: return(temp.read()) traceback: File "st-checker.py", line 70, in parsePdf with open(temp.txt) as temp: UnboundLocalError: local variable 'temp' referenced before assignment