[Python] Frappe ValidationError with PostgreSQL on Navigating to Web Form Route

Discussão em 'Python' iniciado por Stack, Março 5, 2025.

  1. Stack

    Stack Membro Participativo

    I'm integrating PostgreSQL with a Frappe application and encountered a ValidationError when trying to access a web form route. The application throws an error after the web form creation and during the navigation to its route. Below is the traceback:

    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/document_page.py", line 41, in render
    html = self.get_html()
    File "apps/frappe/frappe/website/utils.py", line 521, in cache_html_decorator
    html = func(*args, **kwargs)
    File "apps/frappe/frappe/website/page_renderers/document_page.py", line 50, in get_html
    self.update_context()
    File "apps/frappe/frappe/website/page_renderers/document_page.py", line 56, in update_context
    self.context.update(self.context.doc.as_dict())
    File "apps/frappe/frappe/model/base_document.py", line 473, in as_dict
    doc = self.get_valid_dict(convert_dates_to_str=convert_dates_to_str, ignore_nulls=no_nulls)
    File "apps/frappe/frappe/model/base_document.py", line 379, in get_valid_dict
    frappe.throw(_("Value for {0} cannot be a list").format(_(df.label, context=df.parent)))
    File "apps/frappe/frappe/__init__.py", line 683, in throw
    msgprint(
    File "apps/frappe/frappe/__init__.py", line 648, in msgprint
    _raise_exception()
    File "apps/frappe/frappe/__init__.py", line 599, in _raise_exception
    raise exc
    frappe.exceptions.ValidationError: Value for Condition JSON cannot be a list


    Has anyone faced a similar issue with Frappe and PostgreSQL, specifically regarding ValidationError when navigating to a web form route? Any insights or suggestions on resolving this error would be greatly appreciated.

    Continue reading...

Compartilhe esta Página