Error after installing
bckq opened this issue · comments
Hello,
I have installed your psdash, but I get error when I go to browser:
https://gist.github.com/anonymous/4c4ac112d3a3809b1dc3
I'm having the same problem:
ERROR | psdash.web | Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/psdash/web.py", line 131, in index
netifs.sort(key=lambda x: x["bytes_sent"], reverse=True)
File "/usr/local/lib/python2.7/dist-packages/psdash/web.py", line 131, in <lambda>
netifs.sort(key=lambda x: x["bytes_sent"], reverse=True)
KeyError: 'bytes_sent'
Well, that's not good. Which linux distribution are you trying this on?
Ubuntu 12.04 LTS
64 bit?
Yes, 64 bit.
I haven't really found the cause of the problem as I can't reproduce it. But I commited a fix (49bd6f5) that should remove the crash error.
Would be great if you could try it out and see if your network information seems to be correct or if it's displaying empty or perhaps garbled network info.
+1 Same problem for me on Ubuntu 12.04 LTS 64bit.
Have any of you tried if 49bd6f5 fixes the problem for you?
I have also Ubuntu 12.04.4 LTS x86_64
It's virtual machine. Network nterfaces: lo, venet0 and venet0:0.
After fix I get:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python2.7/dist-packages/psdash-0.1.1-py2.7.egg/psdash/web.py", line 149, in index
return render_template("index.html", **data)
File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 128, in render_template
context, ctx.app)
File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 110, in _render
rv = template.render(context)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/psdash-0.1.1-py2.7.egg/psdash/templates/index.html", line 2, in top-level template code
{% block content %}
File "/usr/local/lib/python2.7/dist-packages/psdash-0.1.1-py2.7.egg/psdash/templates/base.html", line 44, in top-level template code
{% block content %}{% endblock %}
File "/usr/local/lib/python2.7/dist-packages/psdash-0.1.1-py2.7.egg/psdash/templates/index.html", line 157, in block "content"
{{ ni.rx_per_sec|filesizeformat }}
File "/usr/local/lib/python2.7/dist-packages/jinja2/filters.py", line 378, in do_filesizeformat
bytes = float(value)
UndefinedError: 'dict object' has no attribute 'rx_per_sec'
Ah, that makes sense. As it's the same issue as #6. I'll fix it later today.
This should be working now with the 9fe6ac9 fix. Please try :)
Fixed it for me
Fixed it for me too! Thx a bunch
Excellent! I just uploaded v0.1.2 to pypi with the fixes.
Thanks for testing!