Closed adasilva closed 11 years ago
Accidentally pressed New File and chose an invalid filename. Then clicked Ready to convert. Received this error:
Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1473, in call return self.func(*args) File "journal2ebook.py", line 497, in bReadyClick subprocess.call(['k2pdfopt','-x','-col', str(n), '-ml', str(leftmargin), '-mr', str(rightmargin), '-mt', str(topmargin), '-mb', str(bottommargin), '-ui-','-o', newFileName, '"'+self.filename+'.pdf"']) TypeError: cannot concatenate 'str' and 'tuple' objects
Maybe we need a check to ensure that the file exists? If that check fails, bring up the choose file window again?
something like
if not os.path.isfile(filename):
Accidentally pressed New File and chose an invalid filename. Then clicked Ready to convert. Received this error:
Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1473, in call return self.func(*args) File "journal2ebook.py", line 497, in bReadyClick subprocess.call(['k2pdfopt','-x','-col', str(n), '-ml', str(leftmargin), '-mr', str(rightmargin), '-mt', str(topmargin), '-mb', str(bottommargin), '-ui-','-o', newFileName, '"'+self.filename+'.pdf"']) TypeError: cannot concatenate 'str' and 'tuple' objects