Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
pymysql.err.OperationalError: (1055, "tabEnergy Point Log.creation' isn't in GROUP BY") | GoodFirstPicks

pymysql.err.OperationalError: (1055, "tabEnergy Point Log.creation' isn't in GROUP BY")

frappe/frappe 2 comments 19d ago
View on GitHub
lowopenScope: clearSkill match: yesFrappe / ERPNextPython

Why this is a good first issue

The issue involves a SQL query that needs adjustment to comply with strict SQL mode rules.

AI Summary

The issue arises from a SQL query in Frappe that fails under strict SQL mode `ONLY_FULL_GROUP_BY`. The query needs to be adjusted to either aggregate or include all selected fields in the `GROUP BY` clause. The fix is localized to a specific method in the codebase.

Issue Description

Description of the issue

When opening the /app/user-profile page, Frappe throws the following SQL error: pymysql.err.OperationalError: (1055, "tabEnergy Point Log.creation' isn't in GROUP BY").

This happens because my MariaDB/MySQL instance is running with the SQL mode ONLY_FULL_GROUP_BY enabled.
In this mode, MySQL requires that all selected fields be either aggregated or included in the GROUP BY clause.

The problematic query is generated inside: /apps/frappe/frappe/desk/page/user_profile/user_profile.py => get_energy_points_heatmap_data method.

This query selects:

  • UnixTimestamp(Date(eps_log.creation)) (not aggregated)
  • Sum(eps_log.points) (aggregated)

…but only groups by Date(eps_log.creation), which results in SQL error 1055 under strict mode.

Possible solutions

  1. Disable ONLY_FULL_GROUP_BY in the SQL server configuration (workaround).
  2. Adjust the query so that the selected fields comply with strict SQL rules
    (e.g., using MAX() around the timestamp expression or grouping by the exact expression used in the SELECT).

Context information (for bug reports)

**Output

GitHub Labels

bug

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • SQL mode compatibility
Loading labels...

Details

Points10 pts
Difficultylow
Scopeclear
Skill Matchyes
Test Focusedno