Hello everyone, This is in relation to my previous question. Can you pls help me how to fix this issue?
File "/usr/lib/python2.7/base64.py", line 76, in b64decode
raise TypeError(msg)
TypeError: Incorrect padding
HERE is my method:
def csv_writer(self, cr, uid, ids, context=None):
virtual_file = csv.writer(open("/opt/openerp/Alphalist.csv","wb"))
netsvc.Logger().notifyChannel("TEST ...... ", netsvc.LOG_INFO, 'FILE FILE FILE' + str(virtual_file))
student_object = self.pool.get('student.student')
active_id = student_object.search(cr,uid,[])
for obj_list in student_object.browse(cr,uid,active_id,context=context):
virtual_file.writerow([str(obj_list.last_name),str(obj_list.first_name),str(obj_list.middle_name)])
self.create(cr,uid,{
'name' : 'Studentlist',
'file_data' : virtual_file,
})
return True
I attch the image here: