my code:

import unirest

def index():
    response = 
unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key= 
<https://voicerss-text-to-speech.p.mashape.com/?key=c6a700d0f8f343799009e395573f75f2>secret",
    "X-Mashape-Key": "key",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  params={
    "c": "mp3",
    "f": "8khz_8bit_mono",
    "hl": "en-us",
    "r": 0,
    "src": "Hello, world!"
  }
)

  return locals()

{{extend 'layout.html'}} {{=response}} 

    
  
Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.

Traceback (most recent call last):
  File "C:\web2py\gluon\main.py", line 450, in wsgibase
    serve_controller(request, response, session)
  File "C:\web2py\gluon\main.py", line 192, in serve_controller
    run_view_in(response._view_environment)
  File "C:\web2py\gluon\compileapp.py", line 661, in run_view_in
    view = environment['response'].view
AttributeError: 'UnirestResponse' object has no attribute 'view'

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to