TypeError: __init__() takes exactly 2 arguments (1 given)

asked 2014-12-17 07:58:24 -0600

Syed Md Kamruzzaman gravatar image

updated 2014-12-17 07:58:59 -0600

I am getting this error when run horizon in devstack in eclipse. may be it's configuration error but I cannot solve it. please help:

 WARNING:root:No local_settings file found.
    Traceback (most recent call last):
      File "/home/stack/git/horizon/manage.py", line 23, in <module>
      File "/usr/local/lib/python2.7/dist-packages/Django-1.8-py2.7.egg/django/core/management/__init__.py", line 338, in execute_from_command_line
      File "/usr/local/lib/python2.7/dist-packages/Django-1.8-py2.7.egg/django/core/management/__init__.py", line 303, in execute
      File "/usr/local/lib/python2.7/dist-packages/Django-1.8-py2.7.egg/django/conf/__init__.py", line 48, in __getattr__
      File "/usr/local/lib/python2.7/dist-packages/Django-1.8-py2.7.egg/django/conf/__init__.py", line 44, in _setup
        self._wrapped = Settings(settings_module)
      File "/usr/local/lib/python2.7/dist-packages/Django-1.8-py2.7.egg/django/conf/__init__.py", line 92, in __init__
        mod = importlib.import_module(self.SETTINGS_MODULE)
      File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
      File "/home/stack/git/horizon/openstack_dashboard/settings.py", line 339, in <module>
        from horizon.utils import secret_key
      File "/home/stack/git/horizon/horizon/__init__.py", line 27, in <module>
        from horizon.base import Dashboard  # noqa
      File "/home/stack/git/horizon/horizon/base.py", line 45, in <module>
        from horizon import loaders
      File "/home/stack/git/horizon/horizon/loaders.py", line 57, in <module>
        _loader = TemplateLoader()
      File "/usr/local/lib/python2.7/dist-packages/Django-1.8-py2.7.egg/django/template/loader.py", line 50, in __init__
        super(BaseLoader, self).__init__(*args, **kwargs)
    TypeError: __init__() takes exactly 2 arguments (1 given)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-12-18 08:14:26 -0600

Syed Md Kamruzzaman gravatar image

I got this answer here:

Horizon requires Django>=1.4.2,<1.7, you're using Django 1.8 here (see requirements.txt)

The __init__ arguments for BaseLoader have changed between those two versions.

You need to fix your environment and dependencies if you want this to work.



edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-12-17 07:58:24 -0600

Seen: 2,812 times

Last updated: Dec 18 '14