Issue with orthographic accent in products url

Hi, I use ERPNext in spanish, and there is a problem, if a product has a name with orthographic accent and “Show in website” is enabled after going to the category to see the products listed and selecting the product with orthographic accent it gives an error because the url includes the letter with orthographic accent by example: Item name: “Pistache con cáscara” generates the URL http://erp1.com.mx/productos/salado/pistache-con-pistache-con-cáscara-4mix1

Resulting in error:
Uncaught Server Exception
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 39, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 133, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 149, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 156, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 169, in build_page
context = get_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 15, in get_context
context = get_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 35, in get_page_context
page_context = make_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 43, in make_page_context
context = resolve_route(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 18, in resolve_route
context = get_page_info_from_template(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 69, in get_page_info_from_template
if os.path.exists(option) and not os.path.isdir(option):
File “/home/frappe/frappe-bench/env/lib/python2.7/genericpath.py”, line 18, in exists
os.stat(path)
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe1’ in position 82: ordinal not in range(128)

How can solve this? Thanks in advance.

Hi

Accented characters are not supported in the url.

If i’m not mistaken, you have checked show in wesbite in the item master.

Try editing the route manually using the usual english characters and see if it works out!

Hi kennethsequeira, I understand that accented characters are not supported in the URL, I think it could be great it ERPNext could handle the creation of the links removing the accents automatically.

1 Like