Insights error: Connection.init() got unexpected keyword argument 'ssl_mode'

Hi all,

I’m encountering an error when using Insights (v3.2.11) with my ERPNext / Frappe setup.

Environment:

  • ERPNext: 15.50.1
  • Frappe: 15.57.2
  • Insights: 3.2.11

Error Trace:

  File "/mnt/frappe-bench/apps/insights/insights/insights/doctype/insights_data_source_v3/insights_data_source_v3.py", line 234, in get_table_list
    db = self._get_ibis_backend()
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/frappe-bench/apps/insights/insights/insights/doctype/insights_data_source_v3/insights_data_source_v3.py", line 188, in _get_ibis_backend
    frappe.throw(
  File "/mnt/frappe-bench/apps/frappe/frappe/__init__.py", line 606, in throw
    msgprint(
  File "/mnt/frappe-bench/apps/frappe/frappe/__init__.py", line 571, in msgprint
    _raise_exception()
  File "/mnt/frappe-bench/apps/frappe/frappe/__init__.py", line 522, in _raise_exception
    raise exc
insights.insights.doctype.insights_data_source_v3.insights_data_source_v3.DataSourceConnectionError: There was an error connecting to 'Site DB' data source: Connection.__init__() got an unexpected keyword argument 'ssl_mode'

What I’ve tried so far:

  • Upgraded/updated Insights app (using bench update --app insights)
  • Verified database connection settings (host, user, password, etc.)
  • Restarted bench / cleared caches
  • Checked for differences in Ibis / database library versions

Questions / Requests:

  1. Has anyone else seen this ssl_mode error with Insights / Ibis on Frappe 15?
  2. Could this be a mismatch in Ibis version or a breaking change in its Connection API?
  3. What is the correct way to configure SSL / non-SSL connections for Insights’ data sources in this context?

Any help or pointers would be greatly appreciated. Thanks in advance!