__init__() got an unexpected keyword argument 'timeout' #4069

23 views
Skip to first unread message

Khaled Al-Ansari

unread,
Apr 25, 2016, 9:52:09 AM4/25/16
to Django users
Hello, I'm having a problem with djangorest

when i runserver everything looks fine but when I open the browser I get this


Internal Server Error: /
Traceback (most recent call last):
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/utils.py", line 86, in __getitem__
    return self._engines[alias]
KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/core/handlers/base.py", line 174, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/core/handlers/base.py", line 172, in get_response
    response = response.render()
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/response.py", line 160, in render
    self.content = self.rendered_content
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/rest_framework/response.py", line 71, in rendered_content
    ret = renderer.render(self.data, media_type, context)
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/rest_framework/renderers.py", line 674, in render
    template = loader.get_template(self.template)
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/loader.py", line 26, in get_template
    engines = _engine_list(using)
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/loader.py", line 143, in _engine_list
    return engines.all() if using is None else [engines[using]]
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/utils.py", line 110, in all
    return [self[alias] for alias in self]
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/utils.py", line 110, in <listcomp>
    return [self[alias] for alias in self]
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/utils.py", line 101, in __getitem__
    engine = engine_cls(params)
  File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/backends/django.py", line 33, in __init__
    self.engine = Engine(self.dirs, self.app_dirs, **options)
TypeError: __init__() got an unexpected keyword argument 'timeout'


I can't see anything! please help me

Stephen J. Butler

unread,
Apr 25, 2016, 4:13:51 PM4/25/16
to django...@googlegroups.com
Look in your settings.py file for the TEMPLATES line. Do you have a 'timeout' under OPTIONS? Remove that.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/150d44fa-6258-4e9c-8bcc-768435f83c77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages