PelionIoT / licensetool

Tool for converting Yocto License Manifest to list format and comparing changes between license manifest files.
7 stars 2 forks source link

Changes fails on Ubuntu 18.04 #4

Closed JanneKiiskila closed 2 years ago

JanneKiiskila commented 2 years ago
(venv) jankii01@ubuntu1804:~/pelion/licensetool$ python licensetool.py --debug changes tests/3-packages.manifest tests/3-packages.manifest.v2 out.csv
_changes: 'tests/3-packages.manifest', 'tests/3-packages.manifest.v2', 'out.csv'
Traceback (most recent call last):
  File "licensetool.py", line 260, in <module>
    sys.exit(main())
  File "licensetool.py", line 256, in main
    _changes(args.previous, args.current, args.changefile)
  File "licensetool.py", line 142, in _changes
    d_f_prev.to_csv(f_orig, index=False)
  File "/home/jankii01/pelion/licensetool/venv/lib/python3.6/site-packages/pandas/core/generic.py", line 3170, in to_csv
    formatter.save()
  File "/home/jankii01/pelion/licensetool/venv/lib/python3.6/site-packages/pandas/io/formats/csvs.py", line 206, in save
    self._save()
  File "/home/jankii01/pelion/licensetool/venv/lib/python3.6/site-packages/pandas/io/formats/csvs.py", line 314, in _save
    self._save_header()
  File "/home/jankii01/pelion/licensetool/venv/lib/python3.6/site-packages/pandas/io/formats/csvs.py", line 283, in _save_header
    writer.writerow(encoded_labels)
TypeError: a bytes-like object is required, not 'str'
JanneKiiskila commented 2 years ago

Likely some kind of API breakage/incompatibility between Ubuntu 20.04 based Python (it will bring in a newer one).

(venv) jankii01@ubuntu1804:~/pelion/licensetool$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
astroid (2.8.4)
attrs (21.2.0)
backports.entry-points-selectable (1.1.0)
bandit (1.7.0)
coverage (6.1.1)
distlib (0.3.3)
filelock (3.3.2)
gitdb (4.0.9)
GitPython (3.1.20)
importlib-metadata (4.8.1)
importlib-resources (5.4.0)
iniconfig (1.1.1)
isort (5.9.3)
lazy-object-proxy (1.6.0)
licensetool (0.0.0, /home/jankii01/pelion/licensetool)
mccabe (0.6.1)
numpy (1.19.5)
packaging (21.2)
pandas (1.1.5)
pbr (5.6.0)
pip (9.0.1)
pkg-resources (0.0.0)
platformdirs (2.4.0)
pluggy (1.0.0)
py (1.10.0)
pycodestyle (2.8.0)
pylint (2.11.1)
pyparsing (2.4.7)
pytest (6.2.5)
pytest-cov (3.0.0)
pytest-mock (3.6.1)
python-dateutil (2.8.2)
pytz (2021.3)
PyYAML (6.0)
setuptools (39.0.1)
six (1.16.0)
smmap (5.0.0)
stevedore (3.5.0)
toml (0.10.2)
tox (3.24.4)
typed-ast (1.4.3)
typing-extensions (3.10.0.2)
virtualenv (20.10.0)
wheel (0.37.0)
wrapt (1.13.3)
zipp (3.6.0)
JanneKiiskila commented 2 years ago

https://github.com/PelionIoT/licensetool/pull/5 fixes this issue, needs to be tested on Ubuntu 20.04.