-1
私はOdooを使用してテキストファイルをアップロードしています。これはbase64でエンコードする必要がありますが、エンコーディングは '\ n'要素をすべて削除して、ライン。どのように新しい行を残すことができますか?Python attachemnt.encode( 'base64')は nを削除します。
with open("Invoices.txt") as text_file:
attachment=text_file.read()
new_attach =attachment.encode('base64')