-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Code: 417 Uncaught Server Exception There was an error building this page #27220
Comments
Can you grep your code-base for here is mine: ❯ rg 'include_icons'
frappe/hooks.py
41:app_include_icons = [
53:web_include_icons = [
frappe/www/app.py
47: app_include_icons = hooks.get("app_include_icons", [])
58: "app_include_icons": app_include_icons,
frappe/www/app.html
53: {%- for path in app_include_icons -%}
54: {{ include_icons(path) }}
frappe/templates/base.html
83: {%- for path in web_include_icons -%}
84: {{ include_icons(path) }}
frappe/utils/jinja_globals.py
113:def include_icons(path, preload=True):
frappe/utils/boilerplate.py
369:# app_include_icons = "{app_name}/public/icons.svg"
frappe/website/doctype/website_settings/website_settings.py
233: context.web_include_icons = hooks.web_include_icons or [] |
`frappe/website/doctype/website_settings/website_settings.py frappe/hooks.py frappe/utils/boilerplate.py frappe/www/app.py frappe/utils/jinja_globals.py frappe/www/app.html frappe/templates/base.html |
That grep didn't seem to hit the source for this error yet, there's no Do you have more code? Maybe in the database / server scripts which could trigger this? |
Also check other apps, maybe? Maybe you have an old copy of |
Have run this outside apps/ `apps/frappe/frappe/hooks.py apps/frappe/frappe/www/app.py apps/frappe/frappe/www/app.html apps/frappe/frappe/utils/boilerplate.py apps/frappe/frappe/utils/jinja_globals.py apps/frappe/frappe/website/doctype/website_settings/website_settings.py apps/frappe/frappe/templates/base.html |
That still looks good. I can't spot the issue in your code... There must be something else which is being interpreted by the interpreter. But definitely not the lines you shared. |
thank you, i have managed by doing |
problem was in db |
oha, glad it worked! :-) |
I get this error after install frappe from develop branch
`Error Code: 417
Uncaught Server Exception
There was an error building this page
Traceback (most recent call last):
File "apps/frappe/frappe/utils/jinja.py", line 97, in render_template
return get_jenv().from_string(template).render(context)
File "env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "", line 62, in top-level template code
File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 391, in call
if not __self.is_safe_callable(__obj):
File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 275, in is_safe_callable
getattr(obj, "unsafe_callable", False) or getattr(obj, "alters_data", False)
jinja2.exceptions.UndefinedError: 'include_icons' is undefined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apps/frappe/frappe/website/serve.py", line 20, in get_response
response = renderer_instance.render()
File "apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
html = self.get_html()
File "apps/frappe/frappe/website/utils.py", line 523, in cache_html_decorator
if can_cache(context.no_cache):
File "apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
html = self.render_template()
File "apps/frappe/frappe/website/page_renderers/template_page.py", line 236, in render_template
html = frappe.render_template(self.source, self.context, safe_render=safe_render)
File "apps/frappe/frappe/utils/jinja.py", line 99, in render_template
throw(
File "apps/frappe/frappe/init.py", line 602, in throw
exc.__frappe_exc_id = out.__frappe_exc_id
File "apps/frappe/frappe/init.py", line 567, in msgprint
as_list: bool = False,
File "apps/frappe/frappe/init.py", line 518, in _raise_exception
frappe.exceptions.ValidationError:
The text was updated successfully, but these errors were encountered: