qubird / django-chatrooms

A django app providing reverse-ajax chat rooms. Based on gevent.
107 stars 29 forks source link

django gevent is only usable from a single thread #2

Open qiaokan opened 11 years ago

qiaokan commented 11 years ago

I keep receiving this error message. Can someone help me?

NotImplementedError at /chat/get_users_list/ gevent is only usable from a single thread

Request Method: GET Request URL: http://debtdealinc.webfactional.com/chat/get_users_list/?_=1354040441131&room_id=1 Django Version: 1.4.2 Python Executable: /usr/local/bin/python Python Version: 2.7.3 Python Path: ['/home/debtdealinc/webapps/firstsite', '/home/debtdealinc/webapps/firstsite/firstsite', '/home/debtdealinc/webapps/firstsite/lib/python2.7', '/home/debtdealinc/lib/python2.7/pip-1.2.1-py2.7.egg', '/home/debtdealinc/lib/python2.7/oauth-1.0.1-py2.7.egg', '/home/debtdealinc/lib/python2.7/simplejson-2.6.2-py2.7-linux-x86_64.egg', '/home/debtdealinc/lib/python2.7/src/yos-social-python', '/home/debtdealinc/lib/python2.7/python_contact_importer-0.1-py2.7.egg', '/home/debtdealinc/lib/python2.7', '/home/debtdealinc/lib/python2.7', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages/PIL'] Server time: Tue, 27 Nov 2012 12:20:41 -0600 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'accounts', 'registration', 'utils', 'record', 'testdwolla', 'newsfeed', 'survey', 'plus', 'django.contrib.admin', 'twython_django_oauth', 'chatrooms', 'polymorphic') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware')

Traceback: File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/core/handlers/base.py" in get_response

  1. response = callback(request, _callback_args, *_callback_kwargs) File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/utils/decorators.py" in _wrapper
  2. return bound_func(_args, *_kwargs) File "/home/debtdealinc/webapps/firstsite/firstsite/chatrooms/utils/decorators.py" in _wrapped_view
  3. return view_func(request, _args, *_kwargs) File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/utils/decorators.py" in bound_func
  4. return func(self, _args2, *_kwargs2) File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/utils/decorators.py" in _wrapper
  5. return bound_func(_args, *_kwargs) File "/home/debtdealinc/webapps/firstsite/firstsite/chatrooms/utils/decorators.py" in _wrapped_view
  6. return view_func(request, _args, *_kwargs) File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/utils/decorators.py" in bound_func
  7. return func(self, _args2, *_kwargs2) File "/home/debtdealinc/webapps/firstsite/firstsite/chatrooms/ajax/chat.py" in get_users_list
  8. self.new_connected_user_event[room_id].wait(REFRESH_TIME) File "/home/debtdealinc/lib/python2.7/gevent/event.py" in wait
  9. result = get_hub().switch() File "/home/debtdealinc/lib/python2.7/gevent/hub.py" in get_hub
  10. raise NotImplementedError('gevent is only usable from a single thread')

Exception Type: NotImplementedError at /chat/get_users_list/ Exception Value: gevent is only usable from a single thread Request information: GET: roomid = u'1' = u'1354040441131'

POST: No POST data

FILES: No FILES data

COOKIES: csrftoken = 'Db2Q8O6cl5zI3YSonjVR4zqmRT9uJJVn' sessionid = '46d0562b29313b0d9a8b542901991d02' fbm_384537294956203 = 'base_domain=.debtdealinc.webfactional.com'

META: mod_wsgi.listener_port = '27788' HTTP_X_FORWARDED_SERVER = 'debtdealinc.webfactional.com' HTTP_REFERER = 'http://debtdealinc.webfactional.com/chat/room/test/' HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.5' SERVER_PROTOCOL = 'HTTP/1.0' SERVER_SOFTWARE = 'Apache/2.2.17 (Unix) mod_wsgi/3.4 Python/2.7.3' SCRIPT_NAME = u'' mod_wsgi.enable_sendfile = '0' mod_wsgi.handler_script = '' SERVER_SIGNATURE = '' REQUEST_METHOD = 'GET' HTTP_HTTPS = 'off' PATH_INFO = u'/chat/get_users_list/' HTTP_X_FORWARDED_SSL = 'off' QUERYSTRING = '=1354040441131&room_id=1' HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:17.0) Gecko/17.0 Firefox/17.0' HTTP_CONNECTION = 'close' HTTP_COOKIE = 'fbm_384537294956203=base_domain=.debtdealinc.webfactional.com; csrftoken=Db2Q8O6cl5zI3YSonjVR4zqmRT9uJJVn; sessionid=46d0562b29313b0d9a8b542901991d02' SERVER_NAME = 'debtdealinc.webfactional.com' REMOTE_ADDR = '127.0.0.1' mod_wsgi.queue_start = '1354040441541442' mod_wsgi.request_handler = 'wsgi-script' HTTP_HTTP_X_FORWARDED_PROTO = 'http' wsgi.url_scheme = 'http' PATH_TRANSLATED = '/home/debtdealinc/webapps/firstsite/firstsite/firstsite/wsgi.py/chat/get_users_list/' SERVER_PORT = '80' wsgi.multiprocess = True mod_wsgi.input_chunked = '0' SERVER_ADDR = '127.0.0.1' DOCUMENT_ROOT = '/usr/local/apache2/htdocs' mod_wsgi.process_group = 'firstsite' HTTP_X_REQUESTED_WITH = 'XMLHttpRequest' HTTP_X_FORWARDED_PROTO = 'http' SCRIPT_FILENAME = '/home/debtdealinc/webapps/firstsite/firstsite/firstsite/wsgi.py' SERVER_ADMIN = '[no address given]' wsgi.input = <mod_wsgi.Input object at 0x7fb308697070> HTTP_HOST = 'debtdealinc.webfactional.com' wsgi.multithread = True mod_wsgi.callable_object = 'application' REQUEST_URI = '/chat/get_userslist/?=1354040441131&room_id=1' HTTPACCEPT = 'application/json, text/javascript, /_' mod_wsgi.listener_host = '' HTTP_FORWARDED_REQUEST_URI = '/chat/get_userslist/?=1354040441131&room_id=1' wsgi.version = GATEWAY_INTERFACE = 'CGI/1.1' HTTP_X_FORWARDED_FOR = '98.223.172.33' wsgi.errors = <mod_wsgi.Log object at 0x7fb308697170> REMOTE_PORT = '38522' HTTP_X_FORWARDED_HOST = 'debtdealinc.webfactional.com' mod_wsgi.version = wsgi.run_once = False CONTENT_TYPE = 'application/x-www-form-urlencoded' mod_wsgi.application_group = 'web353.webfaction.com|' mod_wsgi.script_reloading = '1' wsgi.file_wrapper = '' CSRF_COOKIE = 'Db2Q8O6cl5zI3YSonjVR4zqmRT9uJJVn' HTTP_ACCEPT_ENCODING = 'gzip, deflate'

Settings: Using settings module firstsite.settings TWITTERSECRET = u'***' USE_L10N = True USE_THOUSAND_SEPARATOR = False CSRF_COOKIE_SECURE = False LANGUAGE_CODE = 'en-us' ROOT_URLCONF = 'firstsite.urls' MANAGERS = ('qiaokan', 'qiaokan.buaa@gmail.com') ACCOUNT_ACTIVATION_DAYS = 2 STATIC_ROOT = '/home/username/webapps/static/' MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage' EMAIL_SUBJECT_PREFIX = '[Django] ' FILE_UPLOAD_PERMISSIONS = None URL_VALIDATOR_USER_AGENT = 'Django/1.4.2 (https://www.djangoproject.com)' STATICFILES_FINDERS = SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_NAME = 'sessionid' ADMIN_FOR = TIME_INPUT_FORMATS = DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'TEST_MIRROR': None, 'NAME': 'debtdealinc', 'TEST_CHARSET': None, 'TIME_ZONE': 'UTC', 'TEST_COLLATION': None, 'PORT': '3306', 'HOST': '', 'USER': 'debtdealinc', 'TESTNAME': None, 'PASSWORD': u'******_', 'OPTIONS': {}}} SERVER_EMAIL = 'admin@debtdealinc.webfactional.com' FILE_UPLOAD_HANDLERS = DEFAULT_CONTENT_TYPE = 'text/html' APPEND_SLASH = True FIRST_DAY_OF_WEEK = 0 DATABASE_ROUTERS = [] YEAR_MONTH_FORMAT = 'F Y' STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' CACHES = {'default': {'LOCATION': '', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} SESSION_COOKIE_PATH = '/' USE_X_FORWARDED_HOST = False MIDDLEWARE_CLASSES = USE_I18N = True THOUSAND_SEPARATOR = ',' SECRETKEY = u'******_' LANGUAGE_COOKIE_NAME = 'django_language' DEFAULT_INDEX_TABLESPACE = '' TRANSACTIONS_MANAGED = False LOGGING_CONFIG = 'django.utils.log.dictConfig' SIGNING_BACKEND = 'django.core.signing.TimestampSigner' SEND_BROKEN_LINK_EMAILS = False TEMPLATE_LOADERS = ('django.template.loaders.cached.Loader', ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')) WSGI_APPLICATION = 'firstsite.wsgi.application' TEMPLATE_DEBUG = True X_FRAME_OPTIONS = 'SAMEORIGIN' AUTHENTICATION_BACKENDS = 'django.contrib.auth.backends.ModelBackend' FORCE_SCRIPT_NAME = None CACHE_BACKEND = 'locmem://' DEFAULT_CHARSET = 'utf-8' SESSION_COOKIE_SECURE = False CSRF_COOKIE_DOMAIN = None FILE_CHARSET = 'utf-8' DEBUG = True SESSION_FILE_PATH = None DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' INSTALLED_APPS = LANGUAGES = COMMENTS_ALLOW_PROFANITIES = False STATICFILES_DIRS = '/home/debtdealinc/webapps/firstsite/firstsite/static' PREPEND_WWW = False SECURE_PROXY_SSL_HEADER = None PASSWORD_RESET_TIMEOUTDAYS = u'******_' SESSION_COOKIE_HTTPONLY = True DEBUG_PROPAGATE_EXCEPTIONS = False MONTH_DAY_FORMAT = 'F j' LOGIN_URL = '/twitter/login' SESSION_EXPIRE_AT_BROWSER_CLOSE = False CONTACT_IMPORT_SETTINGS = {'hotmail': {'consumer_secret': '1AbHKgvjHu9Hi6RKg4mCeWybmNqCUE2', 'policy_url': 'http://example.com/terms/', 'consumer_key': '0004503076062AD7'}, 'yahoo': {'consumer_secret': '0d1fb039dde249c5b9570f4af304364ee3f05cf6', 'consumer_key': 'dj0yJmk9VFpHNWhwNnFMVnl3JmQ9WVdrOVJuQkJUVzFSTjJrbWNHbzlNVEkwTWprME1qVTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD01MQ--'}} TIME_FORMAT = 'P' DATE_INPUT_FORMATS = CSRF_COOKIE_NAME = 'csrftoken' EMAIL_HOSTPASSWORD = u'******_' AUTH_PROFILE_MODULE = 'accounts.UserProfile' CACHE_MIDDLEWARE_ALIAS = 'default' SESSION_SAVE_EVERY_REQUEST = False NUMBER_GROUPING = 0 SESSION_ENGINE = 'django.contrib.sessions.backends.db' CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' CSRF_COOKIE_PATH = '/' LOGIN_REDIRECT_URL = '/accounts/profile/' LOGGING = {'loggers': {'django.request': {'handlers': ['mail_admins'], 'propagate': True, 'level': 'ERROR'}}, 'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}} TWITTERKEY = u'******_' IGNORABLE_404_URLS = LOCALE_PATHS = TEMPLATE_STRING_IF_INVALID = '' LOGOUT_URL = '/twitter/logout' EMAIL_USE_TLS = True FIXTURE_DIRS = EMAIL_HOST = 'smtp.webfaction.com' DATE_FORMAT = 'N j, Y' MEDIA_ROOT = '' DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter' ADMINS = ('qiaokan', 'qiaokan.buaa@gmail.com') FORMAT_MODULE_PATH = None DEFAULT_FROM_EMAIL = 'admin@debtdealinc.webfactional.com' MEDIA_URL = '' DATETIME_FORMAT = 'N j, Y, P' TEMPLATE_DIRS = '/home/debtdealinc/webapps/firstsite/firstsite/templates' SITE_ID = 1 DISALLOWED_USER_AGENTS = ALLOWED_INCLUDE_ROOTS = CLIENT_ID = '1037626707150-dud26shcfi90r29arl8i5nb3bb7k9gtc.apps.googleusercontent.com' DECIMAL_SEPARATOR = '.' SHORT_DATE_FORMAT = 'm/d/Y' LOGOUT_REDIRECT_URL = '/' TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner' CACHE_MIDDLEWARE_KEYPREFIX = u'******_' TIME_ZONE = 'America/Chicago' FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_TABLESPACE = '' TEMPLATE_CONTEXT_PROCESSORS = SITE_DOMAIN = 'https://debtdealinc.webfactional.com/' SESSION_COOKIE_AGE = 1209600 SETTINGS_MODULE = 'firstsite.settings' USE_ETAGS = False LANGUAGES_BIDI = FILE_UPLOAD_TEMP_DIR = None INTERNAL_IPS = STATIC_URL = 'http://debtdealinc.webfactional.com/static/' EMAIL_PORT = 25 LOG_FILE = 'log.log' USE_TZ = True SHORT_DATETIME_FORMAT = 'm/d/Y P' PASSWORDHASHERS = u'******_' ABSOLUTE_URL_OVERRIDES = {} CACHE_MIDDLEWARE_SECONDS = 600 DATETIME_INPUT_FORMATS = CLIENTSECRET = u'******_' EMAIL_HOST_USER = 'franklindebt' PROFANITIESLIST = u'*******'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

qubird commented 11 years ago

Hi What configuration are you using? Are you running the app on gunicorn? Are you using redis or celery as message handler? On Nov 27, 2012 6:22 PM, "qiaokan" notifications@github.com wrote:

I keep receiving this error message. Can someone help me?

NotImplementedError at /chat/get_users_list/ gevent is only usable from a single thread

Request Method: GET Request URL: http://debtdealinc.webfactional.com/chat/get_users_list/?_=1354040441131&room_id=1 Django Version: 1.4.2 Python Executable: /usr/local/bin/python Python Version: 2.7.3 Python Path: ['/home/debtdealinc/webapps/firstsite', '/home/debtdealinc/webapps/firstsite/firstsite', '/home/debtdealinc/webapps/firstsite/lib/python2.7', '/home/debtdealinc/lib/python2.7/pip-1.2.1-py2.7.egg', '/home/debtdealinc/lib/python2.7/oauth-1.0.1-py2.7.egg', '/home/debtdealinc/lib/python2.7/simplejson-2.6.2-py2.7-linux-x86_64.egg', '/home/debtdealinc/lib/python2.7/src/yos-social-python', '/home/debtdealinc/lib/python2.7/python_contact_importer-0.1-py2.7.egg', '/home/debtdealinc/lib/python2.7', '/home/debtdealinc/lib/python2.7', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages/PIL'] Server time: Tue, 27 Nov 2012 12:20:41 -0600 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'accounts', 'registration', 'utils', 'record', 'testdwolla', 'newsfeed', 'survey', 'plus', 'django.contrib.admin', 'twython_django_oauth', 'chatrooms', 'polymorphic') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware')

Traceback: File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/core/handlers/base.py" in get_response

  1. response = callback(request, _callback_args, *_callback_kwargs) File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/utils/decorators.py" in _wrapper
  2. return bound_func(_args, *_kwargs) File "/home/debtdealinc/webapps/firstsite/firstsite/chatrooms/utils/decorators.py" in _wrapped_view
  3. return view_func(request, _args, *_kwargs) File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/utils/decorators.py" in bound_func
  4. return func(self, _args2, *_kwargs2) File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/utils/decorators.py" in _wrapper
  5. return bound_func(_args, *_kwargs) File "/home/debtdealinc/webapps/firstsite/firstsite/chatrooms/utils/decorators.py" in _wrapped_view
  6. return view_func(request, _args, *_kwargs) File "/home/debtdealinc/webapps/firstsite/lib/python2.7/django/utils/decorators.py" in bound_func
  7. return func(self, _args2, *_kwargs2) File "/home/debtdealinc/webapps/firstsite/firstsite/chatrooms/ajax/chat.py" in get_users_list
  8. self.new_connected_user_event[room_id].wait(REFRESH_TIME) File "/home/debtdealinc/lib/python2.7/gevent/event.py" in wait
  9. result = get_hub().switch() File "/home/debtdealinc/lib/python2.7/gevent/hub.py" in get_hub
  10. raise NotImplementedError('gevent is only usable from a single thread')

Exception Type: NotImplementedError at /chat/get_users_list/ Exception Value: gevent is only usable from a single thread Request information: GET: roomid = u'1' = u'1354040441131'

POST: No POST data

FILES: No FILES data

COOKIES: csrftoken = 'Db2Q8O6cl5zI3YSonjVR4zqmRT9uJJVn' sessionid = '46d0562b29313b0d9a8b542901991d02' fbm_384537294956203 = 'base_domain=.debtdealinc.webfactional.com'

META: mod_wsgi.listener_port = '27788' HTTP_X_FORWARDED_SERVER = 'debtdealinc.webfactional.com' HTTP_REFERER = 'http://debtdealinc.webfactional.com/chat/room/test/' HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.5' SERVER_PROTOCOL = 'HTTP/1.0' SERVER_SOFTWARE = 'Apache/2.2.17 (Unix) mod_wsgi/3.4 Python/2.7.3' SCRIPT_NAME = u'' mod_wsgi.enable_sendfile = '0' mod_wsgi.handler_script = '' SERVER_SIGNATURE = '' REQUEST_METHOD = 'GET' HTTP_HTTPS = 'off' PATH_INFO = u'/chat/get_users_list/' HTTP_X_FORWARDED_SSL = 'off' QUERYSTRING = '=1354040441131&room_id=1' HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:17.0) Gecko/17.0 Firefox/17.0' HTTP_CONNECTION = 'close' HTTP_COOKIE = 'fbm_384537294956203=base_domain=. debtdealinc.webfactional.com; csrftoken=Db2Q8O6cl5zI3YSonjVR4zqmRT9uJJVn; sessionid=46d0562b29313b0d9a8b542901991d02' SERVER_NAME = 'debtdealinc.webfactional.com' REMOTE_ADDR = '127.0.0.1' mod_wsgi.queue_start = '1354040441541442' mod_wsgi.request_handler = 'wsgi-script' HTTP_HTTP_X_FORWARDED_PROTO = 'http' wsgi.url_scheme = 'http' PATH_TRANSLATED = '/home/debtdealinc/webapps/firstsite/firstsite/firstsite/ wsgi.py/chat/get_users_list/' SERVER_PORT = '80' wsgi.multiprocess = True mod_wsgi.input_chunked = '0' SERVER_ADDR = '127.0.0.1' DOCUMENT_ROOT = '/usr/local/apache2/htdocs' mod_wsgi.process_group = 'firstsite' HTTP_X_REQUESTED_WITH = 'XMLHttpRequest' HTTP_X_FORWARDED_PROTO = 'http' SCRIPT_FILENAME = '/home/debtdealinc/webapps/firstsite/firstsite/firstsite/wsgi.py' SERVER_ADMIN = '[no address given]' wsgi.input = HTTP_HOST = 'debtdealinc.webfactional.com' wsgi.multithread = True mod_wsgi.callable_object = 'application' REQUEST_URI = '/chat/get_userslist/?=1354040441131&room_id=1' HTTPACCEPT = 'application/json, text/javascript, /_' mod_wsgi.listener_host = '' HTTP_FORWARDED_REQUEST_URI = '/chat/get_userslist/?=1354040441131&room_id=1' wsgi.version = GATEWAY_INTERFACE = 'CGI/1.1' HTTP_X_FORWARDED_FOR = '98.223.172.33' wsgi.errors = REMOTE_PORT = '38522' HTTP_X_FORWARDED_HOST = 'debtdealinc.webfactional.com' mod_wsgi.version = wsgi.run_once = False CONTENT_TYPE = 'application/x-www-form-urlencoded' mod_wsgi.application_group = 'web353.webfaction.com|' mod_wsgi.script_reloading = '1' wsgi.file_wrapper = '' CSRF_COOKIE = 'Db2Q8O6cl5zI3YSonjVR4zqmRT9uJJVn' HTTP_ACCEPT_ENCODING = 'gzip, deflate'

Settings: Using settings module firstsite.settings TWITTERSECRET = u'***' USE_L10N = True USE_THOUSAND_SEPARATOR = False CSRF_COOKIE_SECURE = False LANGUAGE_CODE = 'en-us' ROOT_URLCONF = 'firstsite.urls' MANAGERS = ('qiaokan', 'qiaokan.buaa@gmail.com') ACCOUNT_ACTIVATION_DAYS = 2 STATIC_ROOT = '/home/username/webapps/static/' MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage' EMAIL_SUBJECT_PREFIX = '[Django] ' FILE_UPLOAD_PERMISSIONS = None URL_VALIDATOR_USER_AGENT = 'Django/1.4.2 (https://www.djangoproject.com)' STATICFILES_FINDERS = SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_NAME = 'sessionid' ADMIN_FOR = TIME_INPUT_FORMATS = DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'TEST_MIRROR': None, 'NAME': 'debtdealinc', 'TEST_CHARSET': None, 'TIME_ZONE': 'UTC', 'TEST_COLLATION': None, 'PORT': '3306', 'HOST': '', 'USER': 'debtdealinc', 'TESTNAME': None, 'PASSWORD': u'******_', 'OPTIONS': {}}} SERVER_EMAIL = 'admin@debtdealinc.webfactional.com' FILE_UPLOAD_HANDLERS = DEFAULT_CONTENT_TYPE = 'text/html' APPEND_SLASH = True FIRST_DAY_OF_WEEK = 0 DATABASE_ROUTERS = [] YEAR_MONTH_FORMAT = 'F Y' STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' CACHES = {'default': {'LOCATION': '', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} SESSION_COOKIE_PATH = '/' USE_X_FORWARDED_HOST = False MIDDLEWARE_CLASSES = USE_I18N = True THOUSAND_SEPARATOR = ',' SECRETKEY = u'******_' LANGUAGE_COOKIE_NAME = 'django_language' DEFAULT_INDEX_TABLESPACE = '' TRANSACTIONS_MANAGED = False LOGGING_CONFIG = 'django.utils.log.dictConfig' SIGNING_BACKEND = 'django.core.signing.TimestampSigner' SEND_BROKEN_LINK_EMAILS = False TEMPLATE_LOADERS = ('django.template.loaders.cached.Loader', ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')) WSGI_APPLICATION = 'firstsite.wsgi.application' TEMPLATE_DEBUG = True X_FRAME_OPTIONS = 'SAMEORIGIN' AUTHENTICATION_BACKENDS = 'django.contrib.auth.backends.ModelBackend' FORCE_SCRIPT_NAME = None CACHE_BACKEND = 'locmem://' DEFAULT_CHARSET = 'utf-8' SESSION_COOKIE_SECURE = False CSRF_COOKIE_DOMAIN = None FILE_CHARSET = 'utf-8' DEBUG = True SESSION_FILE_PATH = None DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' INSTALLED_APPS = LANGUAGES = COMMENTS_ALLOW_PROFANITIES = False STATICFILES_DIRS = '/home/debtdealinc/webapps/firstsite/firstsite/static' PREPEND_WWW = False SECURE_PROXY_SSL_HEADER = None PASSWORD_RESET_TIMEOUTDAYS = u'******_' SESSION_COOKIE_HTTPONLY = True DEBUG_PROPAGATE_EXCEPTIONS = False MONTH_DAY_FORMAT = 'F j' LOGIN_URL = '/twitter/login' SESSION_EXPIRE_AT_BROWSER_CLOSE = False CONTACT_IMPORT_SETTINGS = {'hotmail': {'consumer_secret': '1AbHKgvjHu9Hi6RKg4mCeWybmNqCUE2', 'policy_url': ' http://example.com/terms/', 'consumer_key': '0004503076062AD7'}, 'yahoo': {'consumer_secret': '0d1fb039dde249c5b9570f4af304364ee3f05cf6', 'consumer_key': 'dj0yJmk9VFpHNWhwNnFMVnl3JmQ9WVdrOVJuQkJUVzFSTjJrbWNHbzlNVEkwTWprME1qVTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD01MQ--'}} TIME_FORMAT = 'P' DATE_INPUT_FORMATS = CSRF_COOKIE_NAME = 'csrftoken' EMAIL_HOSTPASSWORD = u'******_' AUTH_PROFILE_MODULE = 'accounts.UserProfile' CACHE_MIDDLEWARE_ALIAS = 'default' SESSION_SAVE_EVERY_REQUEST = False NUMBER_GROUPING = 0 SESSION_ENGINE = 'django.contrib.sessions.backends.db' CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' CSRF_COOKIE_PATH = '/' LOGIN_REDIRECT_URL = '/accounts/profile/' LOGGING = {'loggers': {'django.request': {'handlers': ['mail_admins'], 'propagate': True, 'level': 'ERROR'}}, 'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}} TWITTERKEY = u'******_' IGNORABLE_404_URLS = LOCALE_PATHS = TEMPLATE_STRING_IF_INVALID = '' LOGOUT_URL = '/twitter/logout' EMAIL_USE_TLS = True FIXTURE_DIRS = EMAIL_HOST = 'smtp.webfaction.com' DATE_FORMAT = 'N j, Y' MEDIA_ROOT = '' DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter' ADMINS = ('qiaokan', 'qiaokan.buaa@gmail.com') FORMAT_MODULE_PATH = None DEFAULT_FROM_EMAIL = 'admin@debtdealinc.webfactional.com' MEDIA_URL = '' DATETIME_FORMAT = 'N j, Y, P' TEMPLATE_DIRS = '/home/debtdealinc/webapps/firstsite/firstsite/templates' SITE_ID = 1 DISALLOWED_USER_AGENTS = ALLOWED_INCLUDE_ROOTS = CLIENT_ID = ' 1037626707150-dud26shcfi90r29arl8i5nb3bb7k9gtc.apps.googleusercontent.com' DECIMAL_SEPARATOR = '.' SHORT_DATE_FORMAT = 'm/d/Y' LOGOUT_REDIRECT_URL = '/' TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner' CACHE_MIDDLEWARE_KEYPREFIX = u'******_' TIME_ZONE = 'America/Chicago' FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_TABLESPACE = '' TEMPLATE_CONTEXT_PROCESSORS = SITE_DOMAIN = 'https://debtdealinc.webfactional.com/' SESSION_COOKIE_AGE = 1209600 SETTINGS_MODULE = 'firstsite.settings' USE_ETAGS = False LANGUAGES_BIDI = FILE_UPLOAD_TEMP_DIR = None INTERNAL_IPS = STATIC_URL = 'http://debtdealinc.webfactional.com/static/' EMAIL_PORT = 25 LOG_FILE = 'log.log' USE_TZ = True SHORT_DATETIME_FORMAT = 'm/d/Y P' PASSWORDHASHERS = u'******_' ABSOLUTE_URL_OVERRIDES = {} CACHE_MIDDLEWARE_SECONDS = 600 DATETIME_INPUT_FORMATS = CLIENTSECRET = u'******_' EMAIL_HOST_USER = 'franklindebt' PROFANITIESLIST = u'*******'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

— Reply to this email directly or view it on GitHubhttps://github.com/qubird/django-chatrooms/issues/2.

imposeren commented 9 years ago

looks like apache mod_wsgi:

mod_wsgi.listener_port = '27788'