<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">In Python, "logical lines of code" can span multiple physical lines. When printing tracebacks, it only prints the final physical line of the logical line of code in question. So while you're seeing line 1560 and only seeing the "self.max_len", the actual problem may well be on the line before that -- 1559. In this case, that contains self.port -- it's very likely that your modified _install() is setting the port value wrong when constructing the ofp_action_output().<div><br></div><div>-- Murphy</div><div><br><div><div>On May 10, 2015, at 7:58 PM, 博威张 <<a href="mailto:zbw921124@gmail.com">zbw921124@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi,<div><br></div><div>I'm doing something based on <i>l2_multi</i> and I got such problems :</div><div><br></div><div><div>Traceback (most recent call last):</div><div> File "/home/seuzbw/pox/pox/lib/revent/revent.py", line 231, in raiseEventNoErrors</div><div> return self.raiseEvent(event, *args, **kw)</div><div> File "/home/seuzbw/pox/pox/lib/revent/revent.py", line 278, in raiseEvent</div><div> rv = event._invoke(handler, *args, **kw)</div><div> File "/home/seuzbw/pox/pox/lib/revent/revent.py", line 156, in _invoke</div><div> return handler(self, *args, **kw)</div><div> File "/home/seuzbw/pox/ext/test1.py", line 492, in _handle_PacketIn</div><div> self.install_path(dest[0], dest[1], match, event)</div><div> File "/home/seuzbw/pox/ext/test1.py", line 414, in install_path</div><div> self._install_path(p, match, event.ofp)</div><div> File "/home/seuzbw/pox/ext/test1.py", line 360, in _install_path</div><div> self._install(sw, in_port, out_port, match)</div><div> File "/home/seuzbw/pox/ext/test1.py", line 355, in _install</div><div> switch.connection.send(msg)</div><div> File "/home/seuzbw/pox/pox/openflow/of_01.py", line 692, in send</div><div> data = data.pack()</div><div> File "/home/seuzbw/pox/pox/openflow/libopenflow_01.py", line 2322, in pack</div><div> packed += i.pack()</div><div> File "/home/seuzbw/pox/pox/openflow/libopenflow_01.py", line 1560, in pack</div><div> self.max_len)</div><div>error: cannot convert argument to integer</div></div><div><br></div><div><i>self.max_len </i>is in class of <i>ofp_action_output</i>.</div><div><br></div><div>I didn't make any changes either on method of <i>_install()</i> or on class of <i>ofp_action_output,</i> so what's wrong?</div><div><br></div><div>The original <i>l2_multi</i> works fine.</div><div><br></div><div><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thank you.</div><div>Bowei</div></div></div></div></div></div></div></div></div>
</div></div>
</blockquote></div><br></div></body></html>