def make_pdf(self):
self.get_filez()
self.get_client()
file_name = self.client_id+\"_\"+self.client_name+\"_\"+self.batch_num
style =
If you're assigning file_name
here:
file_name = self.client_id+"_"+self.client_name+"_"+self.batch_num
And you're getting a NameError
reporting, that file_name is not defined, then try wrapping the operation in a try..except
, to see what is going wrong:
try:
file_name = self.client_id+"_"+self.client_name+"_"+self.batch_num
except NameError as err:
print err, 'failed, here is some debug stuff:'
print "CLIENT ID =", self.client_id
print "CLIENT NAME =", self.client_name
print "BATCH NUM =", self.batch_num
If any of this is failing, this will set you on the course to finding out why and narrowing down the cause of it.