Server Error UnicodeEncodeError: 'latin-1' codec can't encode characters in position 54-59: ordinal not in range(256)

I’m facing an issue when trying to make an invoice after the last update which includes KSA Tax Invoice update.

please let me know if anyone is facing the same issue

I also have tried to make an invoice in the testing environment it was fine expect production came up with this error

i had same error when creating invoice after update to this virsons

Installed Apps

ERPNext: v12.26.0 (version-12)

Frappe Framework: v12.23.0 (version-12)

KSA VAT: v0.0.1 (develop)

UnicodeEncodeError: ‘latin-1’ codec can’t encode characters in position 25-28: ordinal not in range(256)

if u have sulution for this let me know

thank you

Until now nothing thinking to revert back to old bersion will update if anyvprpgress from my side

Character U+201C Left Double Quotation Mark is not present in the Latin-1 (ISO-8859-1) encoding.

It is present in code page 1252 (Western European). This is a Windows-specific encoding that is based on ISO-8859-1 but which puts extra characters into the range 0x80-0x9F. Code page 1252 is often confused with ISO-8859-1, and it’s an annoying but now-standard web browser behaviour that if you serve your pages as ISO-8859-1, the browser will treat them as cp1252 instead. However, they really are two distinct encodings:

>>> u'He said \u201CHello\u201D'.encode('iso-8859-1')
UnicodeEncodeError
>>> u'He said \u201CHello\u201D'.encode('cp1252')
'He said \x93Hello\x94'

If you are using your database only as a byte store, you can use cp1252 to encode and other characters present in the Windows Western code page. But still other Unicode characters which are not present in cp1252 will cause errors.

You can use encode(..., 'ignore') to suppress the errors by getting rid of the characters, but really in this century you should be using UTF-8 in both your database and your pages. This encoding allows any character to be used. You should also ideally tell MySQL you are using UTF-8 strings (by setting the database connection and the collation on string columns), so it can get case-insensitive comparison and sorting right.

reference :

Its because maybe your default template doesnt support the QR code try to change the invoice template to something support qr from setting and then after saving revert back to your template