Skip to content
Advertisement

dictionary update sequence element #0 has length 0; 2 is required

I was working on my project and everthing worked fine. I tried to open the server in another browser and this error appeared. I stopped the project and start it agian and it stop working on my main browser aswell. I dont have any idea what this cause it.

Internal Server Error: /account/login/
Traceback (most recent call last):
  File "A:repostopanimevenvlibsite-packagesdjangocorehandlersexception.py", line 47, in inner
    response = get_response(request)
  File "A:repostopanimevenvlibsite-packagesdjangocorehandlersbase.py", line 204, in _get_response
    response = response.render()
  File "A:repostopanimevenvlibsite-packagesdjangotemplateresponse.py", line 105, in render
    self.content = self.rendered_content
  File "A:repostopanimevenvlibsite-packagesdjangotemplateresponse.py", line 83, in rendered_content
    return template.render(context, self._request)
  File "A:repostopanimevenvlibsite-packagesdjangotemplatebackendsdjango.py", line 61, in render
    return self.template.render(context)
  File "A:repostopanimevenvlibsite-packagesdjangotemplatebase.py", line 168, in render
    with context.bind_template(self):
  File "C:PythonPython391libcontextlib.py", line 117, in __enter__
    return next(self.gen)
  File "A:repostopanimevenvlibsite-packagesdjangotemplatecontext.py", line 244, in bind_template
    updates.update(processor(self.request))
ValueError: dictionary update sequence element #0 has length 0; 2 is required
[18/Mar/2021 18:52:01] "GET /account/login/ HTTP/1.1" 500 86400

If there is any other information that you need tell me.

Advertisement

Answer

The problem was that I had a view in context_processors that required login @login_required. So I couldnt load any page because i wasnt logged in

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