You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am hesitant to report this as a bug, because I'm not doing anything out of the ordinary with my project, and I would have expected someone else to see this, but it does appear to be a bug.
In the stats.py file, the stats_numbers classmethod has a prototype of: def stats_numbers(cls, data):
I am seeing an error as follows: TypeError: stats_numbers() takes exactly 2 arguments (3 given)
from the getattr function call in the classmethod _stats (same file - line 37 in my version).
It also prevents the graph on the stats page from rendering (which makes sense since the server code threw an exception).
Looking at the rest of the stats_* classmethods in the class, they all have an additional input parameter (either period or key) that the stats_numbers method is missing, and the _stats function is definitely calling it with 2 explicit arguments (and 1 implied argument).
I believe the solution is to change the prototype of stats_numbers to as follows: def stats_numbers(cls, data, period):
and to not use the data provided in the period argument. (Could also name it ignore or something else descriptive).
Anyway, doing this in my environment solved the problem, and the graph renders correctly.
The text was updated successfully, but these errors were encountered:
I am hesitant to report this as a bug, because I'm not doing anything out of the ordinary with my project, and I would have expected someone else to see this, but it does appear to be a bug.
In the stats.py file, the
stats_numbers
classmethod has a prototype of:def stats_numbers(cls, data):
I am seeing an error as follows:
TypeError: stats_numbers() takes exactly 2 arguments (3 given)
from the
getattr
function call in the classmethod_stats
(same file - line 37 in my version).It also prevents the graph on the stats page from rendering (which makes sense since the server code threw an exception).
Looking at the rest of the
stats_*
classmethods in the class, they all have an additional input parameter (eitherperiod
orkey
) that thestats_numbers
method is missing, and the_stats
function is definitely calling it with 2 explicit arguments (and 1 implied argument).I believe the solution is to change the prototype of
stats_numbers
to as follows:def stats_numbers(cls, data, period):
and to not use the data provided in the
period
argument. (Could also name itignore
or something else descriptive).Anyway, doing this in my environment solved the problem, and the graph renders correctly.
The text was updated successfully, but these errors were encountered: