JayVora-SerpentCS / Jasperreports_odoo

Jasper Reports Engine for Odoo
http://www.serpentcs.com
81 stars 144 forks source link

AttributeError: module 'base64' has no attribute 'encodestring' #145

Open Zodk2 opened 1 year ago

Zodk2 commented 1 year ago

The encodestring() and decodestring()was removed in Python3.9

From Python bugs:

base64.encodestring() and base64.decodestring() are aliases deprecated since Python 3.1: encodebytes() and decodebytes() should be used instead.

pascualguerrerocolmenero commented 1 year ago

Just go to /addons/custom_addons/jasper_reports/wizard/jasper_create_data_template.py and replace the following line:

base64_str = base64.encodestring( With base64_str = base64.encodebytes(