dbrgn / rpi_radio

A Raspbery Pi based network music player.
1 stars 1 forks source link

Netzwerk-Interface für Webapp #18

Open dbrgn opened 10 years ago

dbrgn commented 10 years ago

Wenn das gewünschte Netzwerkdevice nicht wlan0 heisst, sondern zB wlp4s0 wie bei mir (gemäss freedesktop.org Standard) gibts eine Exception.

Traceback (most recent call last):
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/gevent/pywsgi.py", line 508, in handle_one_response
    self.run_application()
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/gevent/pywsgi.py", line 494, in run_application
    self.result = self.application(self.environ, self.start_response)
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/flask_socketio.py", line 23, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "server.py", line 86, in dashboard
    return render_template('dashboard.html')
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/flask/templating.py", line 123, in render_template
    ctx.app.update_template_context(context)
  File "/home/danilo/.virtualenvs/rpi_radio/lib/python2.7/site-packages/flask/app.py", line 692, in update_template_context
    context.update(func())
  File "server.py", line 68, in add_ip_addr
    addr = netifaces.ifaddresses('wlan0')
ValueError: You must specify a valid interface name.