POX requires Python 2.7, but I suspect you're using an earlier version.
The best solution would be to run POX with Python 2.7.
The specific problem could probably be fixed like so:
_unfix_map = dict([(k,_unfix_null) for k in of.ofp_match_data.keys()])
-- Murphy
On Jul 29, 2013, at 8:28 AM, Kouvakas Alexandros wrote:
> When I try to run the webservice with the above command I get the following
> error
> Traceback (most recent call last):
> File "/home/inria_nepi/pox/pox/boot.py", line 89, in do_import2
> __import__(name, globals(), locals())
> File "/home/inria_nepi/pox/pox/openflow/webservice.py", line 53, in <module>
> from pox.openflow.of_json import *
> File "/home/inria_nepi/pox/pox/openflow/of_json.py", line 111
> _unfix_map = {k:_unfix_null for k in of.ofp_match_data.keys()}
> ^
> SyntaxError: invalid syntax
> Could not import module: openflow.webservice
>
> I am running the betta branch.
>
> Is there any solution?
>
>
> 2013/4/22 Murphy McCauley <[email protected]>
> You should do a pull. This was fixed in the betta branch a month ago.
>
> -- Murphy
>
> On Apr 22, 2013, at 12:07 PM, ahmed A. wrote:
>
>> Hi,
>>
>> I am trying to communicate with pox through the JSON interface using :
>>
>>
>> ./pox.py log.level --DEBUG openflow.webservice web.webcore
>>
>>
>> But according to the example, when I try to setup a hub using :
>>
>> 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":{}}]}}' http://127.0.0.1:8000/OF/
>> HTTP/1.1 200 OK
>> Server: BaseHTTP/0.3 Python/2.7.3
>> Date: Mon, 22 Apr 2013 18:56:42 GMT
>> Content-Type: application/json
>> Content-Length: 585
>>
>> I get the following error :
>>
>> {"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"}}}
>>
>> In pox I get the following error :
>>
>> File "/users/aabujoda/pox/pox/openflow/of_json.py", line 150, in
>> dict_to_action
>> cls = of._action_map[t]
>> AttributeError: 'module' object has no attribute '_action_map'
>>
>>
>> anyone has encountered a similar error. I am a very new user to POX. I would
>> appreciate any hint or help.
>>
>> Thanks,
>> Ahmed
>
>
>
>
> --
> Kouvakas Alexandros