Is this a POST request where one of the post variables is also named 
"label"? If so, request.vars, which combines get_vars and post_vars, will 
make "label" into a list containing both the GET and POST values. If that's 
the problem, a fix would be to change your code to:

label = request.get_vars.label

Anthony

On Monday, June 5, 2017 at 5:33:47 AM UTC-4, Annet wrote:
>
> I have the following URL:
>
>
> http://127.0.0.1:8000/com/shortcut/target/1349?edge=34&inID=1297&label=NASM+Certified+Personal+Trainer&_signature=9c33ff589c78426ce3fcdf2f53f4408028189128
>
>
> In de target function I have these lines of code:
>
> label = request.vars.label
>
> get_flash(response, invertex.name + ' already received a target mail for 
> ' + label, 'warning', 'custom')
>
>
> When I execute the function, I get the following error:
>
> <type 'exceptions.TypeError'> cannot concatenate 'str' and 'list' objects
>
> File "/Users/iannet/web2py/applications/com/controllers/shortcut.py" 
> <http://127.0.0.1:8000/admin/default/edit/com/controllers/shortcut.py>, line 
> 251, in target
>     get_flash(response, invertex.name + ' already received a target mail for 
> ' + label, 'warning', 'custom')
> TypeError: cannot concatenate 'str' and 'list' objects
>
>
>
> I expected label to be a string, why is it a list?
>
>
> Kind regards,
>
> Annet
>

-- 
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