Skip to content
Advertisement

improperly configured at /accounts/login/

In order to simulate sdn networks i downloaded the mini net 64 bit version and imported it in vmware Workstation pro 12 and through github all the project related stuff have been installed but the thing is when i wanna run it i encounter an error , do you think it’s because of the mysql not being configured with Django? i’d appreciate it if you help me out here

ImproperlyConfigured at /accounts/login/

Error importing module social.apps.django_app.context_processors: "No module named packages.urllib3.poolmanager"

Request Method:     GET
Request URL:    http://127.0.0.1/AuroraSDN/accounts/login/?next=/AuroraSDN/
Django Version:     1.6.1
Exception Type:     ImproperlyConfigured
Exception Value:    

Error importing module social.apps.django_app.context_processors: "No module named packages.urllib3.poolmanager"

Exception Location:     /usr/local/lib/python2.7/dist-packages/social/utils.py in <module>, line 13
Python Executable:  /usr/bin/python
Python Version:     2.7.6
Python Path:    

['/var/www/html/AuroraSDN',
 '/usr/local/lib/python2.7/dist-packages/mininet-2.2.1-py2.7.egg',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/var/www/html/AuroraSDN/Aurora']

Server time:    Thu, 3 Mar 2016 06:23:44 -0300



Environment:


Request Method: GET
Request URL: http://127.0.0.1/AuroraSDN/accounts/login/?next=/AuroraSDN/

Django Version: 1.6.1
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'widget_tweaks',
 'sdn')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  137.                 response = response.render()
File "/usr/lib/python2.7/dist-packages/django/template/response.py" in render
  105.             self.content = self.rendered_content
File "/usr/lib/python2.7/dist-packages/django/template/response.py" in rendered_content
  81.         context = self.resolve_context(self.context_data)
File "/usr/lib/python2.7/dist-packages/django/template/response.py" in resolve_context
  159.         return RequestContext(self._request, context, current_app=self._current_app)
File "/usr/lib/python2.7/dist-packages/debug_toolbar/panels/templates/panel.py" in _request_context__init__
  53.     for processor in get_standard_processors() + processors:
File "/usr/lib/python2.7/dist-packages/django/template/context.py" in get_standard_processors
  148.             func = import_by_path(path)
File "/usr/lib/python2.7/dist-packages/django/utils/module_loading.py" in import_by_path
  26.                     sys.exc_info()[2])
File "/usr/lib/python2.7/dist-packages/django/utils/module_loading.py" in import_by_path
  21.         module = import_module(module_path)
File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
  40.         __import__(name)
File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/__init__.py" in <module>
  17.     from social.strategies.utils import set_current_strategy_getter
File "/usr/local/lib/python2.7/dist-packages/social/strategies/utils.py" in <module>
  1. from social.utils import module_member
File "/usr/local/lib/python2.7/dist-packages/social/utils.py" in <module>
  13. from requests.packages.urllib3.poolmanager import PoolManager

Exception Type: ImproperlyConfigured at /accounts/login/
Exception Value: Error importing module social.apps.django_app.context_processors: "No module named packages.urllib3.poolmanager"

I’d seen it but not solve the problem and then fix another error occurs (https://github.com/omab/python-social-auth/issues/617)

NoReverseMatch at /accounts/login/

u'social' is not a registered namespace

Request Method:     GET
Request URL:    http://127.0.0.1/AuroraSDN/accounts/login/?next=/AuroraSDN/
Django Version:     1.6.1
Exception Type:     NoReverseMatch
Exception Value:    

u'social' is not a registered namespace

Exception Location:     /usr/lib/python2.7/dist-packages/django/core/urlresolvers.py in reverse, line 532
Python Executable:  /usr/bin/python
Python Version:     2.7.6
Python Path:    

['/var/www/html/AuroraSDN',
 '/usr/local/lib/python2.7/dist-packages/mininet-2.2.1-py2.7.egg',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/var/www/html/AuroraSDN/Aurora']

Server time:    Thu, 3 Mar 2016 07:08:34 -0300


Environment:


Request Method: GET
Request URL: http://127.0.0.1/AuroraSDN/accounts/login/?next=/AuroraSDN/

Django Version: 1.6.1
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'widget_tweaks',
 'sdn')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Template error:
In template /var/www/html/AuroraSDN/sdn/templates/sdn/pages-login.html, error at line 23
   u'social' is not a registered namespace
   13 :         <div class="form-group">


   14 :             <input name="username" type="text" class="form-control" placeholder="Username">


   15 :         </div>


   16 :         <div class="form-group">


   17 :             <input name="password" type="password" class="form-control" placeholder="Password">


   18 :         </div>


   19 :         <div class="form-group">


   20 :           <button class="btn btn-primary" type="submit">Login</button>


   21 :         </div>


   22 :         <input type="hidden" name="next" value="{{ next }}" />


   23 :         <!--<a class="btn btn-block btn-google" href=" {% url "social:begin" "google-oauth2" %} "><i class="icon-google"></i> Sign in with Google</a>-->


   24 :         <!--<a class="btn btn-block btn-facebook" href="{% url "social:begin" "facebook" %}"><i class="icon-facebook"></i> Sign in with Facebook</a>-->


   25 :     </form>


   26 : </div>


   27 : <!-- Google+ sign in 


   28 :         <span id="signinButton">


   29 :           <span


   30 :             class="g-signin"


   31 :             data-redirecturi="postmessage"


   32 :             data-accesstype="offline"


   33 :             data-callback="signinCallback"


Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  137.                 response = response.render()
File "/usr/lib/python2.7/dist-packages/django/template/response.py" in render
  105.             self.content = self.rendered_content
File "/usr/lib/python2.7/dist-packages/django/template/response.py" in rendered_content
  82.         content = template.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render
  140.             return self._render(context)
File "/usr/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  85.     return self.nodelist.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/usr/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  85.     return self.nodelist.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/usr/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  85.     return self.nodelist.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py" in render
  447.                         six.reraise(*exc_info)
File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py" in render
  433.             url = reverse(view_name, args=args, kwargs=kwargs, current_app=context.current_app)
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in reverse
  532.                                          key)

Exception Type: NoReverseMatch at /accounts/login/
Exception Value: u'social' is not a registered namespace

Advertisement

Answer

I went through problems while trying to run AuroraSDN. I have been using Debian 8.2 and Ubuntu 14.04. Some problems that I found and could help someone:

1) Do database configuration ONLY in local_settings.py

2) Add line

<include name="json-simple-1.1.1.jar"/>

inside patternset id=lib tag from file ../floodlight/build.xml

3) Change lines

<property name="ant.build.javac.source" value="1.6"/>
<property name="ant.build.javac.target" value="1.6"/>

for

<property name="ant.build.javac.source" value="1.7"/>
<property name="ant.build.javac.target" value="1.7"/> 

inside file ../floodlight/build.xml

4) Create the directory /var/lib/floodlight with proper user permissions

5) You need to change line

from requests.packages.urllib3.poolmanager import PoolManager

for the line

from urllib3.poolmanager import PoolManager

inside file /usr/local/lib/python2.7/dist-packages/social/utils.py

6) On AuroraSDN root directory do a ” python -m compileall . ” .This will recompile all python files.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement