def generate_qrcode(data, filepath): '''?????''' try: img = qrcode.make(data) img.save(filepath) return True except: return False