[GH-ISSUE #836] Internal Error in stats view #745

Closed
opened 2026-02-27 11:13:20 +03:00 by kerem · 8 comments
Owner

Originally created by @fionnb on GitHub (Feb 18, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/836

Hi, on a fresh 1.4.3 install I get errors in the stats module.

File "modoboa_stats/graphics.py", line 94, in export
    timestamp = int(row.find('t').text)

AttributeError: 'NoneType' object has no attribute 'text'

i went digging a bit and had it dump the command, which is:

rrdtool xport --start -1week --end 1455825274 DEF:size_recv=/mail/modoboa/stats/global.rrd:size_recv:AVERAGE CDEF:size_recvpm=size_recv,60,* XPORT:size_recvpm:"Empfangsgr\xc3\xb6sse" DEF:size_sent=/mail/modoboa/stats/global.rrd:size_sent:AVERAGE CDEF:size_sentpm=size_sent,60,* XPORT:size_sentpm:"Versendegr\xc3\xb6sse"

Apparently, when using this command, the result will not contain any 't' fields:

<data>
    <row><v>3.9836091071e+05</v><v>6.2045392857e+04</v></row>
  ...

... and the subsequent code fails. I wonder what goes wrong while constructing the command?

Can I do anything to make it work properly?

Using rrdtool 1.5.5 btw.

Originally created by @fionnb on GitHub (Feb 18, 2016). Original GitHub issue: https://github.com/modoboa/modoboa/issues/836 Hi, on a fresh 1.4.3 install I get errors in the stats module. ``` File "modoboa_stats/graphics.py", line 94, in export timestamp = int(row.find('t').text) ``` `AttributeError: 'NoneType' object has no attribute 'text'` i went digging a bit and had it dump the command, which is: `rrdtool xport --start -1week --end 1455825274 DEF:size_recv=/mail/modoboa/stats/global.rrd:size_recv:AVERAGE CDEF:size_recvpm=size_recv,60,* XPORT:size_recvpm:"Empfangsgr\xc3\xb6sse" DEF:size_sent=/mail/modoboa/stats/global.rrd:size_sent:AVERAGE CDEF:size_sentpm=size_sent,60,* XPORT:size_sentpm:"Versendegr\xc3\xb6sse"` Apparently, when using this command, the result will not contain any 't' fields: ``` <data> <row><v>3.9836091071e+05</v><v>6.2045392857e+04</v></row> ... ``` ... and the subsequent code fails. I wonder what goes wrong while constructing the command? Can I do anything to make it work properly? Using rrdtool 1.5.5 btw.
kerem closed this issue 2026-02-27 11:13:20 +03:00
Author
Owner

@tonioo commented on GitHub (Feb 19, 2016):

Indeed, it looks pretty strange... Could you try with an older version of rrdtool (like 1.4.7) ?

<!-- gh-comment-id:186113110 --> @tonioo commented on GitHub (Feb 19, 2016): Indeed, it looks pretty strange... Could you try with an older version of rrdtool (like 1.4.7) ?
Author
Owner

@fionnb commented on GitHub (Feb 21, 2016):

confirmed: appears in 1.4.7 and is missing in 1.5.5.

<!-- gh-comment-id:186854503 --> @fionnb commented on GitHub (Feb 21, 2016): confirmed: <t> appears in 1.4.7 and is missing in 1.5.5.
Author
Owner

@tonioo commented on GitHub (Feb 21, 2016):

Looks like the output is a bit different with 1.5.5. Anyway, 1.5.5 should have a working JSON output (unlike 1.4.7), I'll make a change to use it if present.

<!-- gh-comment-id:186861346 --> @tonioo commented on GitHub (Feb 21, 2016): Looks like the output is a bit different with 1.5.5. Anyway, 1.5.5 should have a working JSON output (unlike 1.4.7), I'll make a change to use it if present.
Author
Owner

@fionnb commented on GitHub (Feb 22, 2016):

I get it that 1.4.4 does not have the fix yet?

<!-- gh-comment-id:187092519 --> @fionnb commented on GitHub (Feb 22, 2016): I get it that 1.4.4 does not have the fix yet?
Author
Owner

@tonioo commented on GitHub (Feb 22, 2016):

You're right. The stats plugin has its own repository (https://github.com/modoboa/modoboa-stats) so this issue is misplaced.

<!-- gh-comment-id:187093236 --> @tonioo commented on GitHub (Feb 22, 2016): You're right. The stats plugin has its own repository (https://github.com/modoboa/modoboa-stats) so this issue is misplaced.
Author
Owner

@fionnb commented on GitHub (Feb 22, 2016):

I am sorry then. Should I open an issue there or just wait for an update to appear?
Feel free to close this issue if inappropriate.

<!-- gh-comment-id:187113348 --> @fionnb commented on GitHub (Feb 22, 2016): I am sorry then. Should I open an issue there or just wait for an update to appear? Feel free to close this issue if inappropriate.
Author
Owner

@tonioo commented on GitHub (Feb 22, 2016):

Don't worry, I'm going to move this issue.

<!-- gh-comment-id:187115424 --> @tonioo commented on GitHub (Feb 22, 2016): Don't worry, I'm going to move this issue.
Author
Owner

@tonioo commented on GitHub (Feb 22, 2016):

This issue was moved to modoboa/modoboa-stats#11

<!-- gh-comment-id:187115638 --> @tonioo commented on GitHub (Feb 22, 2016): This issue was moved to modoboa/modoboa-stats#11
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#745
No description provided.