Code Monkey home page Code Monkey logo

django-crowd-auth's People

Contributors

elwinarens avatar josezuazo avatar kryptsi avatar pmuller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

django-crowd-auth's Issues

No module named django_crowd_auth

We tried to include this into our zulip instance but we keep getting Internal Server Errors.

In the file /etc/zulip/settings.py we made the following changes:

AUTHENTICATION_BACKENDS = (
django_crowd_auth.backends.Backend
# 'zproject.backends.EmailAuthBackend', # Email and password; just requires SMTP setup
# 'zproject.backends.GoogleMobileOauth2Backend', # Google Apps, setup below
# 'zproject.backends.GitHubAuthBackend', # GitHub auth, setup below
# 'zproject.backends.AzureADAuthBackend', # Microsoft Azure Active Directory auth, setup below
'zproject.backends.ZulipLDAPAuthBackend', # LDAP, setup below
# 'zproject.backends.ZulipRemoteUserBackend', # Local SSO, setup docs on readthedocs
)

CROWD_CLIENT = {
'crowd_url': 'https://crowd.foo.bar',
'app_name': 'foo',
'app_pass': 'bar',
'ssl_verify': '/etc/pki/tls/certs/ca-bundle.crt',
'timeout': 10,
}
CROWD_USERS_ARE_STAFF = True

And in /home/zulip/deployments/current/zprojects/settings.py

MIDDLEWARE = (
# With the exception of it's dependencies,
# our logging middleware should be the top middleware item.
'zerver.middleware.TagRequests',
'zerver.middleware.SetRemoteAddrFromForwardedFor',
'zerver.middleware.LogRequests',
'zerver.middleware.JsonErrorHandler',
'zerver.middleware.RateLimitMiddleware',
'zerver.middleware.FlushDisplayRecipientCache',
'django.middleware.common.CommonMiddleware',
'zerver.middleware.SessionHostDomainMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', # Django-crowd-auth 0.8.0
# Make sure 2FA middlewares come after authentication middleware.
'django_otp.middleware.OTPMiddleware', # Required by Two Factor auth.
'two_factor.middleware.threadlocals.ThreadLocals', # Required by Twilio
# Needs to be after CommonMiddleware, which sets Content-Length
'zerver.middleware.FinalizeOpenGraphDescription',
)

INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',
'django_crowd_auth', #django-crowd-auth 0.8.0
'confirmation',
'pipeline',
'webpack_loader',
'zerver',
'social_django',
# 2FA related apps.
'django_otp',
'django_otp.plugins.otp_static',
'django_otp.plugins.otp_totp',
'two_factor',
]

We are using Python 3.5 and installed with pip3.

But the server never really starts. And uWSGI throws the following error:

*** Starting uWSGI 2.0.17.1 (64bit) on [Thu Aug 8 16:39:23 2019] ***
compiled with version: 6.3.0 20170516 on 25 July 2019 12:43:05
os: Linux-4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u4 (2019-07-19)
nodename: zulip
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /home/zulip/deployments/2019-07-25-15-25-59
detected binary path: /srv/zulip-venv-cache/e1eb6592bce842070114364c4b6387c63e4c43d9/zulip-py3-venv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/zulip/deployments/current/
your processes number limit is 7857
your memory page size is 4096 bytes
detected max file descriptor number: 40000
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /home/zulip/deployments/uwsgi-socket fd 3
Python version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x559afdad2970
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 426040 bytes (416 KB) for 4 cores
*** Operational MODE: preforking ***
Traceback (most recent call last):
File "./zproject/wsgi.py", line 25, in
django.setup() # We need to call setup to load applications.
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/srv/zulip-venv-cache/e1eb6592bce842070114364c4b6387c63e4c43d9/zulip-py3-venv/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named 'django_crowd_auth'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 30043)
spawned uWSGI worker 1 (pid: 30047, cores: 1)
spawned uWSGI worker 2 (pid: 30048, cores: 1)
spawned uWSGI worker 3 (pid: 30049, cores: 1)
spawned uWSGI worker 4 (pid: 30050, cores: 1)

Can Someone help us?

Middleware initialisation breaks app re- load/start if Crowd is unreachable

client.get_cookie_config() does a request to Crowd for the cookie settings:

def sso(get_response):
    """Crowd SSO middleware.
    """
    client = Client.from_settings()
    cookie_config = client.get_cookie_config()
    cookie_name = cookie_config['name']
    cookie_domain = cookie_config['domain']
    cookie_secure = cookie_config['secure']
    LOGGER.debug('Crowd cookie config %r', cookie_config)

This request is retried N times and in case Crowd is unreachable, results in a max retries uncaught exception being thrown, causing the app re- load/start to fail.

Expected behaviour is that the middleware fails gracefully and allows the app to re- load/start, independent of Crowd being up.

I will put up a PR with a fix.

Assuming that request is always an object is incorrect

https://docs.djangoproject.com/en/2.0/topics/auth/customizing/#authentication-backends

request is an HttpRequest and may be None if it wasn’t provided to authenticate() (which passes it on to the backend).

Environment:


Request Method: POST
Request URL: https://hostname/accounts/login/

Django Version: 1.11.10
Python Version: 2.7.13
Installed Applications:
(u'django.contrib.auth',
 u'django.contrib.contenttypes',
 u'django.contrib.sessions',
 u'django.contrib.sites',
 u'django.contrib.messages',
 u'django.contrib.staticfiles',
 u'django.contrib.admin.apps.SimpleAdminConfig',
 u'django.contrib.admindocs',
 u'django.contrib.sitemaps',
 u'social_django',
 u'crispy_forms',
 u'compressor',
 u'rest_framework',
 u'rest_framework.authtoken',
 u'weblate.addons',
 u'weblate.trans',
 u'weblate.lang',
 u'weblate.langdata',
 u'weblate.permissions',
 u'weblate.screenshots',
 u'weblate.accounts',
 u'weblate.utils',
 u'weblate.wladmin',
 u'weblate',
 u'weblate.gitexport')
Installed Middleware:
[u'django.middleware.security.SecurityMiddleware',
 u'django.contrib.sessions.middleware.SessionMiddleware',
 u'django.middleware.common.CommonMiddleware',
 u'django.middleware.locale.LocaleMiddleware',
 u'django.middleware.csrf.CsrfViewMiddleware',
 u'weblate.accounts.middleware.AuthenticationMiddleware',
 u'django.contrib.messages.middleware.MessageMiddleware',
 u'django.middleware.clickjacking.XFrameOptionsMiddleware',
 u'social_django.middleware.SocialAuthExceptionMiddleware',
 u'weblate.accounts.middleware.RequireLoginMiddleware',
 u'weblate.middleware.SecurityMiddleware',
 u'weblate.wladmin.middleware.ConfigurationErrorsMiddleware']



Traceback:

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in inner
  185.                     return func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/weblate/accounts/views.py" in dispatch
  572.         return super(WeblateLoginView, self).dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/views.py" in dispatch
  90.         return super(LoginView, self).dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  88.         return handler(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/generic/edit.py" in post
  182.         if form.is_valid():

File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in is_valid
  183.         return self.is_bound and not self.errors

File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in errors
  175.             self.full_clean()

File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in full_clean
  385.         self._clean_form()

File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in _clean_form
  412.             cleaned_data = self.clean()

File "/usr/local/lib/python2.7/dist-packages/weblate/accounts/forms.py" in clean
  571.                 password=password

File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py" in authenticate
  70.             user = _authenticate_with_backend(backend, backend_path, request, credentials)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py" in _authenticate_with_backend
  116.     return backend.authenticate(*args, **credentials)

File "/usr/local/lib/python2.7/dist-packages/django_crowd_auth/backends.py" in authenticate
  23.         remote_addr = request.META['REMOTE_ADDR']

Exception Type: AttributeError at /accounts/login/
Exception Value: 'NoneType' object has no attribute 'META'

No module named 'crowd'

It seems to be making the API call to Crowd but it cannot find the crowd module
Using: Python3.6
Crowd version 1.0.2 installed in python3.6

APACHE2 ERROR LOG:
[Tue Nov 27 08:03:49.765532 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] mod_wsgi (pid=536): Target WSGI script '/var/www/vhosts/harbinger_django/django.wsgi' cannot be loaded as Python module.
[Tue Nov 27 08:03:49.765637 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] mod_wsgi (pid=536): Exception occurred processing WSGI script '/var/www/vhosts/harbinger_django/django.wsgi'.
[Tue Nov 27 08:03:49.765910 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] Traceback (most recent call last):
[Tue Nov 27 08:03:49.766001 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "/var/www/vhosts/harbinger_django/django.wsgi", line 11, in
[Tue Nov 27 08:03:49.766014 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] application = get_wsgi_application()
[Tue Nov 27 08:03:49.766034 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "/usr/local/lib/python3.6/dist-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Tue Nov 27 08:03:49.766044 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] return WSGIHandler()
[Tue Nov 27 08:03:49.766061 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/wsgi.py", line 136, in init
[Tue Nov 27 08:03:49.766071 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] self.load_middleware()
[Tue Nov 27 08:03:49.766105 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 34, in load_middleware
[Tue Nov 27 08:03:49.766157 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] middleware = import_string(middleware_path)
[Tue Nov 27 08:03:49.766183 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "/usr/local/lib/python3.6/dist-packages/django/utils/module_loading.py", line 17, in import_string
[Tue Nov 27 08:03:49.766193 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] module = import_module(module_path)
[Tue Nov 27 08:03:49.766210 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
[Tue Nov 27 08:03:49.766220 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] return _bootstrap._gcd_import(name[level:], package, level)
[Tue Nov 27 08:03:49.766237 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "", line 994, in _gcd_import
[Tue Nov 27 08:03:49.766254 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "", line 971, in _find_and_load
[Tue Nov 27 08:03:49.766272 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "", line 955, in _find_and_load_unlocked
[Tue Nov 27 08:03:49.766289 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "", line 665, in _load_unlocked
[Tue Nov 27 08:03:49.766306 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "", line 678, in exec_module
[Tue Nov 27 08:03:49.766324 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "", line 219, in _call_with_frames_removed
[Tue Nov 27 08:03:49.766342 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "/usr/local/lib/python3.6/dist-packages/django_crowd_auth/middlewares.py", line 4, in
[Tue Nov 27 08:03:49.766351 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] from django_crowd_auth.client import Client
[Tue Nov 27 08:03:49.766368 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] File "/usr/local/lib/python3.6/dist-packages/django_crowd_auth/client.py", line 2, in
[Tue Nov 27 08:03:49.766377 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] import crowd
[Tue Nov 27 08:03:49.766410 2018] [wsgi:error] [pid 536:tid 139772544972544] [remote 36.72.194.34:56044] ModuleNotFoundError: No module named 'crowd'

Contents of settings.py:
INSTALLED_APPS = [
'django_crowd_auth',
'harbinger.apps.HarbingerConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'bootstrap3',
'bootstrap_themes',
'jquery',
]
CROWD_CLIENT = {
'crowd_url': 'http://notprovided.notprovided.net:8095/crowd',
'app_name': 'notprovided',
'app_pass': 'notprovided!',
'timeout': 10,
}
CROWD_USERS_ARE_STAFF = True
CROWD_SUPERUSERS_GROUP = 'administrators'
AUTHENTICATION_BACKENDS = ['django_crowd_auth.backends.Backend']
MIDDLEWARE = [

'django.middleware.security.SecurityMiddleware',

'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_crowd_auth.middlewares.sso',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',

'crowd.middlewares.CrowdMiddleware',

]

could not be loaded; Error importing module

Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 142, in inner_run
handler = self.get_handler(*args, **options)
File "/usr/local/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 "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 64, in get_handler
return get_internal_wsgi_application()
File "/usr/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 59, in get_internal_wsgi_application
sys.exc_info()[2])
File "/usr/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 49, in get_internal_wsgi_application
return import_string(app_path)
File "/usr/local/lib/python2.7/site-packages/django/utils/module_loading.py", line 20, in import_string
module = import_module(module_path)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/Users/putaohong/Documents/work/git-code/test/its-tools/ytt/ytt/wsgi.py", line 16, in
application = get_wsgi_application()
File "/usr/local/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
return WSGIHandler()
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 153, in init
self.load_middleware()
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 80, in load_middleware
middleware = import_string(middleware_path)
File "/usr/local/lib/python2.7/site-packages/django/utils/module_loading.py", line 20, in import_string
module = import_module(module_path)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
django.core.exceptions.ImproperlyConfigured: WSGI application 'ytt.wsgi.application' could not be loaded; Error importing module: 'No module named middleware'

Django 2.x.x support

It doesn't appear that this supported Django 2.x at this time?

Request Method: | POST
-- | --
https://{site}/accounts/login/
2.0.7
TypeError
'is_staff' is an invalid keyword argument for this function
/usr/local/lib/python3.5/dist-packages/django/db/models/base.py in __init__, line 495
/usr/bin/uwsgi-core
3.5.3
['/usr/local/lib/python3.5/dist-packages/',  '.',  '',  '/usr/lib/python35.zip',  '/usr/lib/python3.5',  '/usr/lib/python3.5/plat-x86_64-linux-gnu',  '/usr/lib/python3.5/lib-dynload',  '/usr/local/lib/python3.5/dist-packages',  '/usr/lib/python3/dist-packages']
Thu, 19 Jul 2018 05:53:48 +0000

'Settings' object has no attribute 'CROWD_CLIENT'

Environment:


Request Method: POST
Request URL: https://hostname/accounts/login/

Django Version: 1.11.10
Python Version: 2.7.13
Installed Applications:
(u'django.contrib.auth',
 u'django.contrib.contenttypes',
 u'django.contrib.sessions',
 u'django.contrib.sites',
 u'django.contrib.messages',
 u'django.contrib.staticfiles',
 u'django.contrib.admin.apps.SimpleAdminConfig',
 u'django.contrib.admindocs',
 u'django.contrib.sitemaps',
 u'social_django',
 u'crispy_forms',
 u'compressor',
 u'rest_framework',
 u'rest_framework.authtoken',
 u'weblate.addons',
 u'weblate.trans',
 u'weblate.lang',
 u'weblate.langdata',
 u'weblate.permissions',
 u'weblate.screenshots',
 u'weblate.accounts',
 u'weblate.utils',
 u'weblate.wladmin',
 u'weblate',
 u'weblate.gitexport')
Installed Middleware:
[u'django.middleware.security.SecurityMiddleware',
 u'django.contrib.sessions.middleware.SessionMiddleware',
 u'django.middleware.common.CommonMiddleware',
 u'django.middleware.locale.LocaleMiddleware',
 u'django.middleware.csrf.CsrfViewMiddleware',
 u'weblate.accounts.middleware.AuthenticationMiddleware',
 u'django.contrib.messages.middleware.MessageMiddleware',
 u'django.middleware.clickjacking.XFrameOptionsMiddleware',
 u'social_django.middleware.SocialAuthExceptionMiddleware',
 u'weblate.accounts.middleware.RequireLoginMiddleware',
 u'weblate.middleware.SecurityMiddleware',
 u'weblate.wladmin.middleware.ConfigurationErrorsMiddleware']



Traceback:

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in inner
  185.                     return func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/weblate/accounts/views.py" in dispatch
  572.         return super(WeblateLoginView, self).dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/views.py" in dispatch
  90.         return super(LoginView, self).dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  88.         return handler(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/generic/edit.py" in post
  182.         if form.is_valid():

File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in is_valid
  183.         return self.is_bound and not self.errors

File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in errors
  175.             self.full_clean()

File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in full_clean
  385.         self._clean_form()

File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in _clean_form
  412.             cleaned_data = self.clean()

File "/usr/local/lib/python2.7/dist-packages/weblate/accounts/forms.py" in clean
  571.                 password=password

File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py" in authenticate
  70.             user = _authenticate_with_backend(backend, backend_path, request, credentials)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py" in _authenticate_with_backend
  116.     return backend.authenticate(*args, **credentials)

File "/usr/local/lib/python2.7/dist-packages/django_crowd_auth/backends.py" in authenticate
  22.         client = Client.from_settings()

File "/usr/local/lib/python2.7/dist-packages/django_crowd_auth/client.py" in from_settings
  22.         return cls(**settings.CROWD_CLIENT)

File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py" in __getattr__
  57.         val = getattr(self._wrapped, name)

Exception Type: AttributeError at /accounts/login/
Exception Value: 'Settings' object has no attribute 'CROWD_CLIENT'

pip 10.x install breaks on unused parse_requirements import in setup.py

pip 10.X+ has moved the module pip.req to pip._internal.req, which causes setup.py to fail for pip 10.X+ on this include:

from pip.req import parse_requirements

Causes the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File ".../django-crowd-auth/setup.py", line 4, in <module>
    from pip.req import parse_requirements
ImportError: No module named 'pip.req'

https://github.com/pmuller/django-crowd-auth/blob/master/setup.py#L4

Additionally, the parse_requirements function is not used as far as i can tell, so it seems this entire import can be removed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.