pycontribs / django-alexa

Amazon Alexa Skills Kit integration for Django -- ARCHIVED contact @ssbarnea if you can resurrect it.
https://github.com/pycontribs/django-alexa/issues/37
MIT License
69 stars 51 forks source link

Error: urlparse #32

Open cuevas1208 opened 6 years ago

cuevas1208 commented 6 years ago

I am trying to run the example alexa.py. When type on browser http://..../django_alexa/alexa/ask/ I get this error:

An error occured in your skill.
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/rest_framework/views.py", line 486, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/rest_framework/views.py", line 163, in http_method_not_allowed
    raise exceptions.MethodNotAllowed(request.method)
rest_framework.exceptions.MethodNotAllowed: Method "GET" not allowed.
Internal Server Error: /django_alexa/alexa/ask/
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/ubuntu/rockford/examples/myproject/django_alexa/views.py", line 88, in dispatch
    validate_response_limit(response.render().content)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/django/template/response.py", line 107, in render
    self.content = self.rendered_content
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/rest_framework/response.py", line 72, in rendered_content
    ret = renderer.render(self.data, accepted_media_type, context)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/rest_framework/renderers.py", line 715, in render
    template = loader.get_template(self.template)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/django/template/loader.py", line 25, in get_template
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: rest_framework/api.html
[29/Nov/2017 09:52:17] "GET /django_alexa/alexa/ask/ HTTP/1.1" 500 96178
lingster commented 5 years ago

Hi, have you tried including 'rest_framework' in your settings.py/INSTALLED_APPS config?