open-dynamic-robot-initiative/master-board

AttributeError: module 'platform' has no attribute 'linux_distribution'

Closed this issue · 1 comments

When I run sudo PYTHONPATH=. python3 example/com_analyser.pyc -i enp1s0 I have got:

-- Start of example script --
if_name: enp1s0
Using Ethernet (enp1s0)
Shutting down connection (enp1s0)
/usr/lib/python3/dist-packages/numpy/core/fromnumeric.py:3256: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
/usr/lib/python3/dist-packages/numpy/core/_methods.py:161: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
/usr/lib/python3/dist-packages/numpy/core/_methods.py:216: RuntimeWarning: Degrees of freedom <= 0 for slice
  ret = _var(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/usr/lib/python3/dist-packages/numpy/core/_methods.py:185: RuntimeWarning: invalid value encountered in true_divide
  arrmean = um.true_divide(
/usr/lib/python3/dist-packages/numpy/core/_methods.py:209: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
  File "/home/dvogureckiy99/git/master-board/sdk/master_board_sdk/example/com_analyser.py", line 320, in <module>
    main()
  File "/home/dvogureckiy99/git/master-board/sdk/master_board_sdk/example/com_analyser.py", line 316, in main
    example_script(parser.parse_args().interface)
  File "/home/dvogureckiy99/git/master-board/sdk/master_board_sdk/example/com_analyser.py", line 296, in example_script
    text_file.write("Linux distribution: " + platform.linux_distribution()[0] + ' ' + platform.linux_distribution()[1] + ' ' + platform.linux_distribution()[2] + '\n')
AttributeError: module 'platform' has no attribute 'linux_distribution'

I think regarding to this answer you should specify the version of python3 you have used.

Sorry, didn't update the repo.