I have a problem with creating a PDF with Reportlab from PySide GUI. Actually, I have to save a PDF with data of client (name, phone, etc) and i use his name and some data for path name. So, I get an Error 2 that No such file or directory exists. But when I run a test script without GUI, I have no problems. Please, help! The code is pretty basic.
class GUI(QWidget):
...
def createPDF(self):
#Here are some settings for PDF
name = 'Alex Snow'
date = '15/07/2018'
c = canvas.Canvas(name+'_from_'+dat+'.pdf',pagesize=A4)
#Other strings and images and tables
...
c.save()
f = open(filename, "wb")
FileNotFoundError: [Errno 2] No such file or directory: 'Alex Snow_from_10/07/2018.pdf'