I guess that should not happen, but it does every time I chose „last three
months“. Is it a bug or something in my config/installation?
Greetlings, Hraban
This exception has already been seen 3 times
last time it was seen: 2014-02-18 05:05:47
last time it was notified: 2014-02-18 05:05:47
* 2014-02-18 05:05:56 -> ValueError: day is out of range for month
(webstat_engine.py:2206:create_graph_trend_flot)
** User details
agent: Mozilla/5.0 (Macintosh; Intel Mac OS
X 10_9_1) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/7.0.1
Safari/537.73.11
email: [email protected]
group: []
guest: 0
language: de
login_method: Local
nickname: admin
precached_canseehiddenmarctags: True
precached_permitted_restricted_collections: []
precached_sendcomments: True
precached_useadmin: True
precached_usealerts: True
precached_useapprove: True
precached_usebaskets: True
precached_usegroups: True
precached_useloans: True
precached_usemessages: True
precached_usepaperattribution: True
precached_usepaperclaim: True
precached_usestats: True
precached_viewclaimlink: False
precached_viewsubmissions: True
referer:
<https://invenio.cerebrale.net/stats/collection_population?ln=de&collection=All&format=flot×pan=full+history&s_date=02%2F18%2F2014+00%3A00&f_date=02%2F18%2F2014+05%3A05&action_gen=Generate>
remote_host:
remote_ip: 92.62.79.37
session: aaea84a9581c398806e2b71d967d801d
uid: 1
uri:
</stats/collection_population?ln=de&collection=All&format=flot×pan=last+three+months&s_date=02%2F18%2F2014+00%3A00&f_date=02%2F18%2F2014+05%3A05&action_gen=Generate>
** Traceback details
Traceback (most recent call last):
File
"/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler_wsgi.py",
line 514, in application
ret = invenio_handler(req)
File "/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler.py",
line 371, in _profiler
return _handler(req)
File "/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler.py",
line 433, in _handler
return root._traverse(req, path, False, guest_p)
File "/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler.py",
line 240, in _traverse
return obj._traverse(req, path, do_head, guest_p)
File "/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler.py",
line 253, in _traverse
result = _check_result(req, obj(req, form))
File "/usr/local/lib/python2.6/dist-packages/invenio/webstat_webinterface.py",
line 200, in collection_population
body=perform_display_keyevent('collection population', argd, req, ln=ln),
File "/usr/local/lib/python2.6/dist-packages/invenio/webstat.py", line 1348,
in perform_display_keyevent
os.path.basename(filename), settings, ln=ln) + sql
File "/usr/local/lib/python2.6/dist-packages/invenio/webstat.py", line 1654,
in _perform_display_event
create_graph_trend(data, path, settings)
File "/usr/local/lib/python2.6/dist-packages/invenio/webstat_engine.py", line
1971, in create_graph_trend
create_graph_trend_flot(trend, path, settings)
File "/usr/local/lib/python2.6/dist-packages/invenio/webstat_engine.py", line
2206, in create_graph_trend_flot
next = current.replace(day=31)
ValueError: day is out of range for month
** Stack frame details
Frame create_graph_trend_flot in
/usr/local/lib/python2.6/dist-packages/invenio/webstat_engine.py at line 2206
-------------------------------------------------------------------------------
2203 current = _to_datetime(maxx, '%Y-%m-%d %H:%M:%S')
2204 next = current + granularity_td
2205 if (granularity_td.seconds + granularity_td.days * 24 * 3600)
> 2592000:
----> 2206 next = current.replace(day=31)
2207 tics += 'xaxis: {
mode:"time",min:parseDate%s("%s"),max:parseDate%s("%s")},'\
2208 % (title, _to_datetime(minx, '%Y-%m-%d %H:%M:%S'), title,
next)
2209
-------------------------------------------------------------------------------
size = "['500', '400']"
minx = "'2013-12-01 00:00:00'"
maxx = "'2014-02-01 00:00:00'"
rows = '3'
title = "'Population'"
trend = "[('2013-12-01 00:00:00', 1961L), ('2014-01-01
00:00:00', 1962L), ('2014-02-01 00:00:00', 1968L)]"
settings = '{\'multiple\': None, \'format\': \'flot\',
\'xtic_format\': \'%b\', \'title\': \'Population in collection "All"\',
\'xlabel\': \'Last three months (month)\', \'ylabel\': \'Number of records\'}'
next = 'datetime.datetime(2014, 3, 4, 0, 0)'
current = 'datetime.datetime(2014, 2, 1, 0, 0)'
tics = "'yaxis: {\\n tickDecimals :
0\\n },'"
granularity_td = 'datetime.timedelta(31)'
path =
"'/opt/invenio/var/www/img/tmp_webstat_collection_population_All_last_three_months'"
first = '1'
out = '\'<!--[if IE]><script language="javascript"
type="text/javascript"\\n
src="http://invenio.cerebrale.net/js/excanvas.min.js"></script><![endif]-->\\n
<script language="javascript" type="text/javascript"
src="http://invenio.cerebrale.net/js/jquery.flot.min.js"></script>\\n
<script language="javascript" type="text/javascript"
src="http://invenio.cerebrale.net/js/jquery.flot.selection.min.js"></script>\\n
<script id="source" language="javasc [...]
row = '2'
Frame create_graph_trend in
/usr/local/lib/python2.6/dist-packages/invenio/webstat_engine.py at line 1971
-------------------------------------------------------------------------------
1968 elif settings["format"] == 'gnuplot':
1969 create_graph_trend_gnu_plot(trend, path, settings)
1970 elif settings["format"] == "flot":
----> 1971 create_graph_trend_flot(trend, path, settings)
1972
1973
1974 def create_graph_trend_ascii_art(trend, path, settings):
-------------------------------------------------------------------------------
trend = "[('2013-12-01 00:00:00', 1961L), ('2014-01-01
00:00:00', 1962L), ('2014-02-01 00:00:00', 1968L)]"
path =
"'/opt/invenio/var/www/img/tmp_webstat_collection_population_All_last_three_months'"
settings = '{\'multiple\': None, \'format\': \'flot\',
\'xtic_format\': \'%b\', \'title\': \'Population in collection "All"\',
\'xlabel\': \'Last three months (month)\', \'ylabel\': \'Number of records\'}'
Frame _perform_display_event in
/usr/local/lib/python2.6/dist-packages/invenio/webstat.py at line 1654
-------------------------------------------------------------------------------
1651 create_graph_table(data, path, settings)
1652 return
TEMPLATES.tmpl_display_event_trend_text(settings["title"], path, ln=ln)
1653
----> 1654 create_graph_trend(data, path, settings)
1655 if settings["format"] == "asciiart":
1656 out = TEMPLATES.tmpl_display_event_trend_ascii(
1657 settings["title"], path, ln=ln)
-------------------------------------------------------------------------------
ln = "'de'"
path =
"'/opt/invenio/var/www/img/tmp_webstat_collection_population_All_last_three_months'"
data = "[('2013-12-01 00:00:00', 1961L), ('2014-01-01
00:00:00', 1962L), ('2014-02-01 00:00:00', 1968L)]"
name =
"'webstat_collection_population_All_last_three_months'"
settings = '{\'multiple\': None, \'format\': \'flot\',
\'xtic_format\': \'%b\', \'title\': \'Population in collection "All"\',
\'xlabel\': \'Last three months (month)\', \'ylabel\': \'Number of records\'}'
Frame perform_display_keyevent in
/usr/local/lib/python2.6/dist-packages/invenio/webstat.py at line 1348
-------------------------------------------------------------------------------
1345 else:
1346 sql = ''
1347 return out + _perform_display_event(data,
----> 1348 os.path.basename(filename), settings, ln=ln)
+ sql
1349
1350
1351 def perform_display_customevent(ids=[], args={}, req=None,
ln=CFG_SITE_LANG):
-------------------------------------------------------------------------------
t_args = "{'xtic_format': '%b', 't_format': '%Y-%m-%d',
't_fullname': 'Last three months', 't_start': '2013-12-01', 'collection':
'All', 'granularity': 'month', 't_end': '2014-02-18'}"
args = "{'f_date': '02/18/2014 05:05', 'ln': 'de',
'format': 'flot', 'timespan': 'last three months', 'collection': 'All',
's_date': '02/18/2014 00:00', 'sql': 0}"
force = 'False'
settings = '{\'multiple\': None, \'format\': \'flot\',
\'xtic_format\': \'%b\', \'title\': \'Population in collection "All"\',
\'xlabel\': \'Last three months (month)\', \'ylabel\': \'Number of records\'}'
ln = "'de'"
data = "[('2013-12-01 00:00:00', 1961L), ('2014-01-01
00:00:00', 1962L), ('2014-02-01 00:00:00', 1968L)]"
req =
'<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
0x2b5d8c3e1810>'
list = 'False'
param = "'collection'"
filename =
"'webstat_collection_population_All_last_three_months'"
event_id = "'collection population'"
options = "{'timespan': ('combobox', 'Time span',
[('today', 'Today', '2014-02-18', '2014-02-19', 'hour', '%Y-%m-%d', '%H'),
('this week', 'This week', '2014-02-17', '2014-02-19', 'day', '%Y-%m-%d',
'%a'), ('last week', 'Last week', '2014-02-10', '2014-02-17', 'day',
'%Y-%m-%d', '%a'), ('this month', 'This month', '2014-02-01', '2014-02-19',
'day', '%Y-%m-%d', '%d'), ('last month', 'Last month', '2014-01-01',
'2014-02-01', 'day', '%Y-%m-%d', '%d'), ('last three months', 'Last three
months', '2013-12-01', [...]
parr = "'The collection population is the number of
documents existing in the selected collection.'"
sql = "''"
choosed = "{'timespan': 'last three months', 's_date':
'02/18/2014 00:00', 'f_date': '02/18/2014 05:05', 'collection': 'All',
'format': 'flot'}"
gatherer = '<function <lambda> at 0x2b5d8c3e3b90>'
order = "['collection', 'format', 'timespan']"
allow_refresh = 'True'
out = '\'<p>The collection population is the number
of documents existing in the selected collection.</p><form method="get">\\n
<input type="hidden" name="ln" value="de" /><table id="keyevent_table"
class="searchbox">\\n <thead>\\n
<tr><th class="searchboxheader">Collection</th><th
class="searchboxheader">Output format</th><th class="searchboxheader">Time
span</th><th class="searchboxheader"></th></tr>\\n </thead>\\n
<tbody [...]
Frame collection_population in
/usr/local/lib/python2.6/dist-packages/invenio/webstat_webinterface.py at line
200
-------------------------------------------------------------------------------
197 ln=ln)
198
199 return page(title="Collection population",
----> 200 body=perform_display_keyevent('collection
population', argd, req, ln=ln),
201 navtrail="""<a class="navtrail"
href="%s/stats/%s">Statistics</a>""" % \
202 (CFG_SITE_URL, (ln != CFG_SITE_LANG and '?ln=' +
ln) or ''),
203 description="Invenio, Statistics, Collection
population",
-------------------------------------------------------------------------------
auth_msg = "'Authorization granted'"
form = "{'timespan': [Field('timespan', 'last three
months')], 'ln': [Field('ln', 'de')], 'format': [Field('format', 'flot')],
'f_date': [Field('f_date', '02/18/2014 05:05')], 'collection':
[Field('collection', 'All')], 'action_gen': [Field('action_gen', 'Generate')],
's_date': [Field('s_date', '02/18/2014 00:00')]}"
ln = "'de'"
self =
'<invenio.webstat_webinterface.WebInterfaceStatsPages object at 0x2b5d8c3e1190>'
req =
'<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
0x2b5d8c3e1810>'
user_info = "{'uid': 1, 'agent': 'Mozilla/5.0 (Macintosh;
Intel Mac OS X 10_9_1) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/7.0.1
Safari/537.73.11', 'precached_viewclaimlink': False, 'session':
'aaea84a9581c398806e2b71d967d801d', 'precached_useadmin': True, 'group': [],
'guest': '0', 'precached_usepaperattribution': True, 'precached_usepaperclaim':
True, 'precached_viewsubmissions': True, 'precached_usegroups': True, 'email':
'[email protected]', 'precached_usealerts': True, 'precached_usestats':
[...]
auth_code = '0'
argd = "{'f_date': '02/18/2014 05:05', 'ln': 'de',
'format': 'flot', 'timespan': 'last three months', 'collection': 'All',
's_date': '02/18/2014 00:00', 'sql': 0}"
Frame _traverse in
/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler.py at line
253
-------------------------------------------------------------------------------
250 req.uri not in CFG_NO_LANG_RECOGNITION_URIS:
251 ln = get_preferred_user_language(req)
252 form.add_field('ln', ln)
----> 253 result = _check_result(req, obj(req, form))
254 return result
255
256 def __call__(self, req, form):
-------------------------------------------------------------------------------
obj = '<bound method
WebInterfaceStatsPages.collection_population of
<invenio.webstat_webinterface.WebInterfaceStatsPages object at 0x2b5d8c3e1190>>'
name = "'collection_population'"
form = "{'timespan': [Field('timespan', 'last three
months')], 'ln': [Field('ln', 'de')], 'format': [Field('format', 'flot')],
'f_date': [Field('f_date', '02/18/2014 05:05')], 'collection':
[Field('collection', 'All')], 'action_gen': [Field('action_gen', 'Generate')],
's_date': [Field('s_date', '02/18/2014 00:00')]}"
guest_p = '0'
req =
'<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
0x2b5d8c3e1810>'
component = "'collection_population'"
do_head = 'False'
path = '[]'
self =
'<invenio.webstat_webinterface.WebInterfaceStatsPages object at 0x2b5d8c3e1190>'
Frame _traverse in
/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler.py at line
240
-------------------------------------------------------------------------------
237 # renderer. We even pass it the parsed form arguments.
238 if path:
239 if hasattr(obj, '_traverse'):
----> 240 return obj._traverse(req, path, do_head, guest_p)
241 else:
242 raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND
243
-------------------------------------------------------------------------------
obj =
'<invenio.webstat_webinterface.WebInterfaceStatsPages object at 0x2b5d8c3e1190>'
name = "'stats'"
guest_p = '0'
req =
'<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
0x2b5d8c3e1810>'
component = "'stats'"
do_head = 'False'
path = "['collection_population']"
self =
'<invenio.webinterface_layout.WebInterfaceInvenio object at 0x2b5d8c3e1610>'
Frame _handler in
/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler.py at line
455
-------------------------------------------------------------------------------
452 if 'debug' in args:
453 remote_debugger.error_msg(args['debug'])
454 register_exception(req=req, alert_admin=True)
----> 455 raise
456
457 # Serve an error by default.
458 raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND
-------------------------------------------------------------------------------
req =
'<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
0x2b5d8c3e1810>'
allowed_methods = "('GET', 'POST', 'HEAD', 'OPTIONS', 'PUT')"
g = 'None'
guest_p = '0'
args = "{'timespan': ['last three months'], 'ln':
['de'], 'format': ['flot'], 'f_date': ['02/18/2014 05:05'], 'collection':
['All'], 'action_gen': ['Generate'], 's_date': ['02/18/2014 00:00']}"
uri = "'/stats/collection_population'"
path = "['stats', 'collection_population']"
root =
'<invenio.webinterface_layout.WebInterfaceInvenio object at 0x2b5d8c3e1610>'
bad_msie = 'None'
Frame _profiler in
/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler.py at line
371
-------------------------------------------------------------------------------
368 raise Exception('Debugging requested, but no
debugger registered: "%s"' % args['debug'])
369 return _handler(req)
370 else:
----> 371 return _handler(req)
372
373 def _handler(req):
374 """ This handler is invoked by mod_python with the apache
request."""
-------------------------------------------------------------------------------
user_info = "{'uid': 1, 'agent': 'Mozilla/5.0 (Macintosh;
Intel Mac OS X 10_9_1) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/7.0.1
Safari/537.73.11', 'precached_viewclaimlink': False, 'session':
'aaea84a9581c398806e2b71d967d801d', 'precached_useadmin': True, 'group': [],
'guest': '0', 'precached_usepaperattribution': True, 'precached_usepaperclaim':
True, 'precached_viewsubmissions': True, 'precached_usegroups': True, 'email':
'[email protected]', 'precached_usealerts': True, 'precached_usestats':
[...]
args = "{'timespan': ['last three months'], 'ln':
['de'], 'format': ['flot'], 'f_date': ['02/18/2014 05:05'], 'collection':
['All'], 'action_gen': ['Generate'], 's_date': ['02/18/2014 00:00']}"
req =
'<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
0x2b5d8c3e1810>'
_handler = '<function _handler at 0x2b5d8c3c7758>'
Frame application in
/usr/local/lib/python2.6/dist-packages/invenio/webinterface_handler_wsgi.py at
line 531
-------------------------------------------------------------------------------
528 else:
529 req.flush()
530 except:
----> 531 register_exception(req=req, alert_admin=True)
532 if not req.response_sent_p:
533 req.status = HTTP_INTERNAL_SERVER_ERROR
534 req.headers_out['content-type'] = 'text/html'
-------------------------------------------------------------------------------
start_response = '<built-in method start_response of
mod_wsgi.Adapter object at 0x2b5d8c3ce288>'
environ = "{'mod_wsgi.listener_port': '443',
'HTTP_REFERER':
'https://invenio.cerebrale.net/stats/collection_population?ln=de&collection=All&format=flot×pan=full+history&s_date=02%2F18%2F2014+00%3A00&f_date=02%2F18%2F2014+05%3A05&action_gen=Generate',
'mod_wsgi.listener_host': '', 'SERVER_SOFTWARE': 'Apache', 'SCRIPT_NAME': '',
'mod_wsgi.handler_script': '', 'SERVER_SIGNATURE': '', 'REQUEST_METHOD': 'GET',
'PATH_INFO': '/stats/collection_population', 'SERVER_PROTOCOL': 'HTTP/1.1',
'QUERY_STRING': 'ln [...]
req =
'<invenio.webinterface_handler_wsgi.SimulatedModPythonRequest object at
0x2b5d8c3e1810>'
possible_handler = 'None'
possible_module = 'None'