NetworkGradeLinux / meta-mion-sde

Mion layer for broadcom/barefoot/etc SDE support
MIT License
0 stars 0 forks source link

Cannot Access BfRt Python CLI Through bfshell #12

Open CommitThis opened 3 years ago

CommitThis commented 3 years ago

Bringing up the bf_switchd process drops the caller into the Barefoot Shell (bfshell). There is an option (bfrt_python) at the top-level context to access Barefoot Runtime commands via Python.

An attempt to enter this mode results in the following error:

bfshell> bfrt_python
Traceback (most recent call last):
  File "/usr/lib/python3.4/bfrtcli.py", line 3, in <module>
    from traitlets.config import Config
  File "/usr/lib/python3.4/traitlets/__init__.py", line 1, in <module>
    from .traitlets import *
  File "/usr/lib/python3.4/traitlets/traitlets.py", line 57, in <module>
    import six
  File "/usr/lib/python3.4/six.py", line 631, in <module>
    import struct
  File "/usr/lib/python3.4/struct.py", line 13, in <module>
    from _struct import *
ImportError: No module named '_struct'
Failed to load bfrtcli python library
bfrt_cli_cmd:197 could not initialize bf_rt for the cli. err: 1
CommitThis commented 3 years ago

As of 2nd June 2021, this issue still exists.

toganlabs commented 3 years ago

I'll take a look at this over the next two weeks.