[P4-dev] counter example

Antonin Bas antonin at barefootnetworks.com
Mon Jul 31 13:42:47 EDT 2017


This is the same kind of error again, i.e. a version mismatch between the
files generated by the thrift compiler and the thrift python package.
Assuming you do have the correct versions now, did you re-build the
behavioral-model after re-installing thrift?

On Mon, Jul 31, 2017 at 4:57 AM, mostafa <mostafaammar at aast.edu> wrote:

> Dear Antonin,
>
>
>
> Thanks for your reply, I installed thrift version 0.9.3.
>
>
>
> I tried the counter example when running ./run_switch I have the following
> error
>
>
>
> No Thrift port specified, using CLI default
>
> Traceback (most recent call last):
>
>   File "/home/flowvisor/bmv2/targets/simple_switch/sswitch_CLI.py", line
> 23, in              <module>
>
>     import runtime_CLI
>
>   File "/home/flowvisor/bmv2/tools/runtime_CLI.py", line 32, in <module>
>
>     from bm_runtime.standard import Standard
>
>   File "/home/flowvisor/bmv2/tools/bm_runtime/standard/Standard.py", line
> 9, in              <module>
>
>     from thrift.Thrift import TType, TMessageType, TFrozenDict,
> TException, TApp             licationException
>
> ImportError: cannot import name TFrozenDict
>
> READY!!!
>
>
>
>
>
>
>
> *From:* Antonin Bas [mailto:antonin at barefootnetworks.com]
> *Sent:* Friday, July 28, 2017 9:24 PM
> *To:* mostafa <mostafaammar at aast.edu>
> *Cc:* p4-dev <p4-dev at lists.p4.org>
> *Subject:* Re: [P4-dev] counter example
>
>
>
> This generally indicates that your Thrift compiler version does not match
> your Thrift Python package version.
>
> You can confirm this by comparing the outputs of "thrift --version" and
> "pip freeze | grep thrift". Also note that we only support versions 0.9.2
> and 0.9.3. We recommend that you use 0.9.3.
>
>
>
> On Thu, Jul 27, 2017 at 9:08 PM, mostafa <mostafaammar at aast.edu> wrote:
>
> Dear All,
>
>
>
> I am newbie to P4 development,I followed instructions and installed
> mininet, bmv2 switch and p4c compiler.
>
> I was testing the counter example in https://github.com/p4lang/
> tutorials/tree/master/examples/counter , I am having the following error
>
>
>
> Traceback (most recent call last):
>
>   File "/home/flowvisor/bmv2/targets/simple_switch/sswitch_CLI.py", line
> 23, in <module>
>
>     import runtime_CLI
>
>   File "/home/flowvisor/bmv2/tools/runtime_CLI.py", line 32, in <module>
>
>     from bm_runtime.standard import Standard
>
>   File "/home/flowvisor/bmv2/tools/bm_runtime/standard/Standard.py", line
> 11, in <module>
>
>     from thrift.TRecursive import fix_spec
>
> ImportError: No module named TRecursive
>
>
>
>
>
> Also what is the best way to learn P4 .
>
>
>
> BR,
>
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
>
>
>
>
> --
>
> Antonin
>



-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170731/4ef7365f/attachment-0002.html>


More information about the P4-dev mailing list