Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in statistics in a new installed system #230

Open
System25 opened this issue Aug 28, 2019 · 0 comments
Open

Error in statistics in a new installed system #230

System25 opened this issue Aug 28, 2019 · 0 comments

Comments

@System25
Copy link
Contributor

Hi, when you install a new system and you still have no data (no root OU defined) the statistics page (/admins/statistics/) fails because of the empty OUs data:

2019-08-28 10:08:50,919 DEBUG [gecoscc.views.admins][DummyThread-136] admins.py ::: statistics - sorted_ous = OrderedDict()
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 936, in handle_one_response
    self.run_application()
  File "/usr/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 909, in run_application
    self.result = self.application(self.environ, self.start_response)
  File "/usr/local/lib/python2.7/site-packages/paste/translogger.py", line 68, in __call__
    return self.application(environ, replacement_start_response)
  File "/usr/local/lib/python2.7/site-packages/pyramid/router.py", line 272, in __call__
    response = self.invoke_subrequest(request, use_tweens=True)
  File "/usr/local/lib/python2.7/site-packages/pyramid/router.py", line 247, in invoke_subrequest
    response = handle_request(request)
  File "/usr/local/lib/python2.7/site-packages/pyramid/tweens.py", line 46, in excview_tween
    response = view_callable(exc, request)
  File "/usr/local/lib/python2.7/site-packages/pyramid/config/views.py", line 385, in viewresult_to_response
    result = view(context, request)
  File "/usr/local/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/usr/local/lib/python2.7/site-packages/pyramid/router.py", line 163, in handle_request
    response = view_callable(context, request)
  File "/usr/local/lib/python2.7/site-packages/pyramid/config/views.py", line 245, in _secured_view
    return view(context, request)
  File "/usr/local/lib/python2.7/site-packages/pyramid/config/views.py", line 355, in rendered_view
    result = view(context, request)
  File "/usr/local/lib/python2.7/site-packages/gecoscc/views/admins.py", line 410, in statistics
    ou_id = str(sorted_ous.items()[0][0])
IndexError: list index out of range
Wed Aug 28 10:08:50 2019 {'REMOTE_PORT': '50140', 'HTTP_HOST': '192.168.11.14', 'REMOTE_ADDR': '127.0.0.1', (hidden keys: 28)} failed with IndexError

Best regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant