<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>POX requires Python 2.7, but I suspect you're using an earlier version.</div><div><br></div><div>The best solution would be to run POX with Python 2.7.</div><div><br></div><div>The specific problem could probably be fixed like so:</div><div>_unfix_map = dict([(k,_unfix_null) for k in of.ofp_match_data.keys()])</div><div><br></div><div>-- Murphy</div><div><br><div><div>On Jul 29, 2013, at 8:28 AM, Kouvakas Alexandros wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:garamond,serif">When I try to run the webservice with the above command I get the following error<br>Traceback (most recent call last):<br> File "/home/inria_nepi/pox/pox/boot.py", line 89, in do_import2<br>
__import__(name, globals(), locals())<br> File "/home/inria_nepi/pox/pox/openflow/webservice.py", line 53, in <module><br> from pox.openflow.of_json import *<br> File "/home/inria_nepi/pox/pox/openflow/of_json.py", line 111<br>
_unfix_map = {k:_unfix_null for k in of.ofp_match_data.keys()}<br> ^<br> SyntaxError: invalid syntax<br>Could not import module: openflow.webservice<br><br></div><div class="gmail_default" style="font-family:garamond,serif">
I am running the betta branch.<br><br></div><div class="gmail_default" style="font-family:garamond,serif">Is there any solution?<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/22 Murphy McCauley <span dir="ltr"><<a href="mailto:murphy.mccauley@gmail.com" target="_blank">murphy.mccauley@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">You should do a pull. This was fixed in the betta branch a month ago.<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>-- Murphy</div></font></span><div><div class="h5"><div><br><div><div>On Apr 22, 2013, at 12:07 PM, ahmed A. wrote:</div><br><blockquote type="cite"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi, </span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">I am trying to communicate with pox through the JSON interface using :</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>./pox.py log.level --DEBUG openflow.webservice web.webcore</div>
<div><br></div><div><br></div><div>But according to the example, when I try to setup a hub using : </div><div><br></div><div><div>node0:~/pox/pox/messenger> curl -i -X POST -d '{"method":"set_table","params":{"dpid": "0-1b-21-6b-cd-20","flows":[{"actions":[{"type":"OFPAT_OUTPUT", "port":"OFPP_ALL"}],"match":{}}]}}' <a href="http://127.0.0.1:8000/OF/" target="_blank">http://127.0.0.1:8000/OF/</a> </div>
<div>HTTP/1.1 200 OK</div><div>Server: BaseHTTP/0.3 Python/2.7.3</div><div>Date: Mon, 22 Apr 2013 18:56:42 GMT</div><div>Content-Type: application/json</div><div>Content-Length: 585</div><div><br></div><div>I get the following error : <br>
</div><div><br></div><div>{"id": null, "error": {"message": "<type 'exceptions.RuntimeError'>: Operation timed out", "code": 99, "data": {"traceback": "Traceback (most recent call last):\n File \"/users/aabujoda/pox/pox/web/jsonrpc.py\", line 164, in _handle\n r = method(*params,**kw)\n File \"/users/aabujoda/pox/pox/openflow/webservice.py\", line 194, in _exec_set_table\n return OFSetTableRequest(con, flows).get_response()\n File \"/users/aabujoda/pox/pox/openflow/webservice.py\", line 87, in get_response\n raise RuntimeError(\"Operation timed out\")\nRuntimeError: Operation timed out\n"}}}</div>
<div><br></div></div><div>In pox I get the following error :</div><div><br></div><div><div>File "/users/aabujoda/pox/pox/openflow/of_json.py", line 150, in dict_to_action</div><div> cls = of._action_map[t]</div>
<div>AttributeError: 'module' object has no attribute '_action_map'</div><div><br></div><div><br></div><div>anyone has encountered a similar error. I am a very new user to POX. I would appreciate any hint or help.</div>
<div><br></div><div>Thanks, </div></div><div>Ahmed</div></div></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><br>-- <br>Kouvakas Alexandros
</div>
</blockquote></div><br></div></body></html>