Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] render_login_html_to_string() missing 1 required positional argument: 'template_name' #53

Closed
sarthakk97 opened this issue Jan 17, 2020 · 1 comment

Comments

@sarthakk97
Copy link

I get this error during an SP initiated Login.

render_login_html_to_string() missing 1 required positional argument: 'template_name'

Here is the stack trace

[django.request] Internal Server Error: /saml2/#/process/
Traceback (most recent call last):
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/django/utils/decorators.py", line 45, in _wrapper
return bound_method(*args, **kwargs)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/django/contrib/auth/mixins.py", line 52, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/djangosaml2idp/views.py", line 102, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/django/views/generic/base.py", line 97, in dispatch
return handler(request, *args, **kwargs)
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/djangosaml2idp/views.py", line 291, in get
relay_state=request.session['RelayState'])
File "/Users/admin/Virtual_Envs/myproject/lib/python3.6/site-packages/djangosaml2idp/views.py", line 210, in create_html_response
"data": self.render_login_html_to_string(context=context, request=request),
TypeError: render_login_html_to_string() missing 1 required positional argument: 'template_name'

The issue seems to be because template_name is not passed to render_login_html_to_string()

@sarthakk97 sarthakk97 changed the title render_login_html_to_string() missing 1 required positional argument: 'template_name' [Bug] render_login_html_to_string() missing 1 required positional argument: 'template_name' Jan 20, 2020
mjholtkamp pushed a commit to mjholtkamp/djangosaml2idp that referenced this issue Feb 3, 2020
@mhindery
Copy link
Contributor

mhindery commented Feb 3, 2020

I've release bugfix release v0.6.2 to pypi which solves this issue.

@mhindery mhindery closed this as completed Feb 3, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants