server.py - addressInNetwork : unpack requires a string argument of length 8
Closed this issue · 3 comments
Starting the server, http://127.0.0.1:5000/action/
24/07/2013 19:32:43 INFO - Start REST API
24/07/2013 19:32:43 INFO - * Running on http://0.0.0.0:5000/
24/07/2013 19:32:50 INFO - 127.0.0.1 - - [24/Jul/2013 19:32:50] "GET /action/about HTTP/1.1" 404 -
24/07/2013 19:32:50 INFO - 127.0.0.1 - - [24/Jul/2013 19:32:50] "GET /favicon.ico HTTP/1.1" 404 -
24/07/2013 19:32:52 ERROR - Exception on /action/ [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/flask/views.py", line 84, in view
return self.dispatch_request(*args, **kwargs)
File "server.py", line 160, in dispatch_request
if not check_ip(request):
File "server.py", line 57, in check_ip
if addressInNetwork(request.remote_addr, net):
File "server.py", line 49, in addressInNetwork
ipaddr = struct.unpack('L', socket.inet_aton(ip))[0]
error: unpack requires a string argument of length 8
T'as config comment le ALLOWED_HOSTS ?
Le 24.07.2013 19:37, David Fischer a écrit :
Starting the server, http://127.0.0.1:5000/action/
|24/07/2013 19:32:43 INFO - Start REST API
24/07/2013 19:32:43 INFO - * Running on http://0.0.0.0:5000/
24/07/2013 19:32:50 INFO - 127.0.0.1 - - [24/Jul/2013 19:32:50] "GET /action/about HTTP/1.1" 404 -
24/07/2013 19:32:50 INFO - 127.0.0.1 - - [24/Jul/2013 19:32:50] "GET /favicon.ico HTTP/1.1" 404 -
24/07/2013 19:32:52 ERROR - Exception on /action/ [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_functionsrule.endpoint
File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view
return self.dispatch_request(_args, *_kwargs)
File "server.py", line 160, in dispatch_request
if not check_ip(request):
File "server.py", line 57, in check_ip
if addressInNetwork(request.remote_addr, net):
File "server.py", line 49, in addressInNetwork
ipaddr = struct.unpack('L', socket.inet_aton(ip))[0]
error: unpack requires a string argument of length 8
|—
Reply to this email directly or view it on GitHub
#5.
Maximilien Cuony [The_glu]
http://theglu.org
./Simple Django client/app/settings.py:32:ALLOWED_HOSTS = []
closing. allowed_hosts must not be empty