What is the best way to troubleshoot this error? TypeError: sequence item 1: expected string, int found
The python file (not mentioned in the traceback) is 500 lines.
Request Headers:
COOKIE: admin_sess=c13d2f729d47c132b223e8f19ce77ac25aa12
ORIGIN: https://192.168.1.135:5001
Remote-Addr: 192.168.1.161
Content-Length: 36
USER-AGENT: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/43.0.2357.81 Chrome/43.0.2357.81 Safari/537.36
CONNECTION: keep-alive
REFERER: https://192.168.1.135:5001/
X-REQUESTED-WITH: XMLHttpRequest
HOST: 192.168.1.135:5001
ACCEPT: */*
ACCEPT-LANGUAGE: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ACCEPT-ENCODING: gzip, deflate
[18/Jun/2015:18:10:15] HTTP Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 661, in respond
response.finalize()
File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 927, in finalize
content = self.collapse_body()
File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 894, in collapse_body
newbody = ntob('').join(newbody)
TypeError: sequence item 1: expected string, int found
The
str.join
function expects a sequence of string, but at least one item in yournewbody
isint
. Try to cast them to string first: