即使所有部分都是字符串,我也收到以下 python 错误
request = str(self.SETUP) + " " + str(self.fileName) + "RTSP/1.0";
TypeError: unsupported operand type(s) for +: 'int' and 'str'
整个代码部分:
if requestCode == self.SETUP and self.state == self.INIT:
threading.Thread(target=self.recvRtspReply).start()
# Update RTSP sequence number.
self.rtspSeq = self.rtspSeq + 1
# Write the RTSP request to be sent.
request = str(self.SETUP) + " " + str(self.fileName) + "RTSP/1.0"
# Keep track of the sent request.
self.requestSent = request