POS Error UnicodeEncodeError

Hello ,
In POS using arabic characters show this erro :

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 55, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 891, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py", line 190, in make_invoice
    submit_invoice(si_doc, name)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py", line 233, in submit_invoice
    save_invoice(e, si_doc, name)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py", line 240, in save_invoice
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1268, in log_error
    get_doc(dict(doctype='Error Log', error=str(message or get_traceback()),
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3370-3372: ordinal not in range(128)

And when submit its add it to Offline records and this error sown when trying ti sync offline

having the same issue!

Hi @Dany_Carvalheiro, @ahmad18189

We are working on the issue, seems stock is not exist and system trying capture the exception. Can you check stock is available for POS item, kindly add the stock for POS item is stock doesn’t exist


i have tryied to add stock, but i think it doesnt recognize the change after you submite the sale. is there any form to clean the offline records from memory. so it doesnt keep trying to sync those records?

No there is no such feature available, when did you add stock?
Create backdated stock entry.

i add stock after submitte a invoice.
i went to another computer and tryied and doesnt show up the error anymore only on the one i did the first transation without stock

I did not try it yet ,
but to clear offline record , in Chrome
right click in Inspect ,
in application tab
in storage
there a record with pos
delete it and you will delete offline records

thank you