-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegrambot/bot_views/generic/base.py", line 20, in handle
text = TextResponse(self.template_text, ctx).render()
File "/usr/local/lib/python3.5/dist-packages/telegrambot/bot_views/generic/responses.py", line 30, in render
return template.render(ctx)
File "/usr/local/lib/python3.5/dist-packages/django/template/backends/django.py", line 64, in render
context = make_context(context, request, autoescape=self.backend.engine.autoescape)
File "/usr/local/lib/python3.5/dist-packages/django/template/context.py", line 287, in make_context
raise TypeError('context must be a dict rather than %s.' % context.class.name)
TypeError: context must be a dict rather than RequestContext.
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/telegrambot/views.py", line 22, in post
bot.handle(Update.de_json(request.data))
File "/usr/local/lib/python3.5/dist-packages/telegrambot/models/bot.py", line 51, in handle
callback(self, update, **callback_kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegrambot/bot_views/generic/base.py", line 39, in view
return self.handle(bot, update, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/telegrambot/bot_views/generic/base.py", line 20, in handle
text = TextResponse(self.template_text, ctx).render()
File "/usr/local/lib/python3.5/dist-packages/telegrambot/bot_views/generic/responses.py", line 30, in render
return template.render(ctx)
File "/usr/local/lib/python3.5/dist-packages/django/template/backends/django.py", line 64, in render
context = make_context(context, request, autoescape=self.backend.engine.autoescape)
File "/usr/local/lib/python3.5/dist-packages/django/template/context.py", line 287, in make_context
raise TypeError('context must be a dict rather than %s.' % context.class.name)
TypeError: context must be a dict rather than RequestContext.
Error processing {'update_id': 508629733, 'message': <telegram.message.Message object at 0x7f10be6833c8>} for token ...
It is happiness when i try use someone from tests directory.
I can fix it if replace line 29 in file telegrambot/bot_views/generic/responses.py from:
ctx = RequestContext(HttpRequest(), self.ctx)
to:
ctx = self.ctx
But i dont know whats can happiness?
Please tell me right way to fix this issue?