2017-04-23 3 views
0

Ich arbeite derzeit an einem Projekt, das Twilio verwendet, um eine automatisierte Umfrage zu haben. Ich versuche python manage.py runserver und ich erhalte die folgenden Ergebnisse:Django Python runserver error: Projekt verwendet Twilio für Umfragen

System check identified no issues (0 silenced). 
April 23, 2017 - 12:15:51 
Django version 1.11, using settings 'vizeserver.settings' 
Starting development server at http://127.0.0.1:8000/ 
Quit the server with CTRL-BREAK. 
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x04406FA8 
> 
Traceback (most recent call last): 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\uti 
ls\autoreload.py", line 227, in wrapper 
    fn(*args, **kwargs) 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\cor 
e\management\commands\runserver.py", line 147, in inner_run 
    handler = self.get_handler(*args, **options) 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\con 
trib\staticfiles\management\commands\runserver.py", line 27, in get_handler 
    handler = super(Command, self).get_handler(*args, **options) 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\cor 
e\management\commands\runserver.py", line 68, in get_handler 
    return get_internal_wsgi_application() 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\cor 
e\servers\basehttp.py", line 47, in get_internal_wsgi_application 
    return import_string(app_path) 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\uti 
ls\module_loading.py", line 20, in import_string 
    module = import_module(module_path) 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\importlib\__init__.py", 
line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 986, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 969, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked 
    File "<frozen importlib._bootstrap>", line 673, in _load_unlocked 
    File "<frozen importlib._bootstrap_external>", line 665, in exec_module 
    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed 
    File "C:\Users\Thomas\Documents\Development\TwilioSurvey\vizeserver\vizeserver\wsgi.py", lin 
e 16, in <module> 
    application = get_wsgi_application() 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\cor 
e\wsgi.py", line 14, in get_wsgi_application 
    return WSGIHandler() 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\handlers\wsgi.py", line 151, in __init__ 
    self.load_middleware() 
    File "C:\Users\Thomas\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\handlers\base.py", line 82, in load_middleware 
    mw_instance = middleware(handler) 
TypeError: object() takes no parameters 

Ich habe meine vizeserver.settings sah in und ich sehe nichts aus. Der Link für den GitHub ist https://github.com/Vize-Programming-Team/web-server. Ich habe versucht zu sehen, ob etwas mit der Middleware nicht stimmt, aber ich weiß nicht, was los ist. Danke!

Antwort

0

das Problem bei der Middleware ist, versuchen Sie Ihr middleware.py in auto_survey zu

class SMSMiddleware(object): 

    def __init__(self, get_response): 
     self.get_response = get_response 

    def __call__(self, request): 

     response = self.get_response(request) 
     args = request.POST or request.GET 
     request.is_sms = args and args.get('MessageSid') 

     return response 
+0

Sie Ändern Dank! Das hat es gelöst! –

Verwandte Themen