[pox-dev] cannot convert argument to integer in pack self.max_len

Murphy McCauley murphy.mccauley at gmail.com
Sun May 10 20:06:24 PDT 2015


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().

-- Murphy

On May 10, 2015, at 7:58 PM, 博威张 <zbw921124 at gmail.com> wrote:

> Hi,
> 
> I'm doing something based on l2_multi and I got such problems :
> 
> Traceback (most recent call last):
>   File "/home/seuzbw/pox/pox/lib/revent/revent.py", line 231, in raiseEventNoErrors
>     return self.raiseEvent(event, *args, **kw)
>   File "/home/seuzbw/pox/pox/lib/revent/revent.py", line 278, in raiseEvent
>     rv = event._invoke(handler, *args, **kw)
>   File "/home/seuzbw/pox/pox/lib/revent/revent.py", line 156, in _invoke
>     return handler(self, *args, **kw)
>   File "/home/seuzbw/pox/ext/test1.py", line 492, in _handle_PacketIn
>     self.install_path(dest[0], dest[1], match, event)
>   File "/home/seuzbw/pox/ext/test1.py", line 414, in install_path
>     self._install_path(p, match, event.ofp)
>   File "/home/seuzbw/pox/ext/test1.py", line 360, in _install_path
>     self._install(sw, in_port, out_port, match)
>   File "/home/seuzbw/pox/ext/test1.py", line 355, in _install
>     switch.connection.send(msg)
>   File "/home/seuzbw/pox/pox/openflow/of_01.py", line 692, in send
>     data = data.pack()
>   File "/home/seuzbw/pox/pox/openflow/libopenflow_01.py", line 2322, in pack
>     packed += i.pack()
>   File "/home/seuzbw/pox/pox/openflow/libopenflow_01.py", line 1560, in pack
>     self.max_len)
> error: cannot convert argument to integer
> 
> self.max_len is in class of ofp_action_output.
> 
> I didn't make any changes either on method  of _install() or on class of ofp_action_output, so what's wrong?
> 
> The original l2_multi works fine.
> 
> Thank you.
> Bowei

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20150510/eb7b44af/attachment.html>


More information about the pox-dev mailing list