jrief / django-websocket-redis

Websockets for Django applications using Redis as message queue
http://django-websocket-redis.awesto.com/
MIT License
895 stars 222 forks source link

runserver error with django 1.11b1 #222

Open nickpell opened 7 years ago

nickpell commented 7 years ago

When I execute runserver I get the following error:

  File "/Users/Nick/.virtualenvs/hq_env3/lib/python2.7/site-packages/django/utils/autoreload.py", line 227, in wrapper
    fn(*args, **kwargs)
  File "/Users/Nick/.virtualenvs/hq_env3/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 147, in inner_run
    handler = self.get_handler(*args, **options)
  File "/Users/Nick/.virtualenvs/hq_env3/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py", line 27, in get_handler
    handler = super(Command, self).get_handler(*args, **options)
  File "/Users/Nick/.virtualenvs/hq_env3/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 68, in get_handler
    return get_internal_wsgi_application()
  File "/Users/Nick/.virtualenvs/hq_env3/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 57, in get_internal_wsgi_application
    sys.exc_info()[2])
  File "/Users/Nick/.virtualenvs/hq_env3/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 47, in get_internal_wsgi_application
    return import_string(app_path)
  File "/Users/Nick/.virtualenvs/hq_env3/lib/python2.7/site-packages/django/utils/module_loading.py", line 20, in import_string
    module = import_module(module_path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/Nick/.virtualenvs/hq_env3/lib/python2.7/site-packages/ws4redis/django_runserver.py", line 9, in <module>
    from django.core.handlers.wsgi import logger
django.core.exceptions.ImproperlyConfigured: WSGI application 'ws4redis.django_runserver.application' could not be loaded; Error importing module: 'cannot import name logger'

Looking at https://github.com/django/django/blame/1.11b1/django/core/handlers/wsgi.py the variable logger has been removed.

jrief commented 7 years ago

I currently have no resources to migrate ws4redis to Django.1.11 Any volunteer here?

nanuxbe commented 7 years ago

I can try to take a look this weekend or early next week

jrief commented 7 years ago

Thanks Emma!

thongly commented 7 years ago

@jrief - looks like this is passing builds. If so, can this get merged in?

MegaJoctan commented 3 years ago

After long struggle to get things to work I was able to successfully run the server after making changes from wsgi to asgi configuration, Its not a bad thing as asgi is a successor to wsgi open settings.py delete the wsgi configuration or comment to hide it like the way I did

# WSGI_APPLICATION = 'DjangoBlog.wsgi.application' 

ASGI_APPLICATION = 'DjangoBlog.asgi.application'`

then create the file named asgi.py and paste this code inside it

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'DjangoBlog.settings')

application = get_asgi_application()

DjangoBlog is the name of my project change it to suit yours