Open
Description
Description
Running scancode-license-data
that comes with 32.3.0 does not work.
How To Reproduce
- Install
scancode-toolkit
version 32.3.0. - Run
scancode-license-data
without any arguments. - See
$ scancode-license-data
Dumping license data to: None
Traceback (most recent call last):
File "/opt/python/versions/3.11.10/bin/scancode-license-data", line 8, in <module>
sys.exit(dump_scancode_license_data())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/python/versions/3.11.10/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/python/versions/3.11.10/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/python/versions/3.11.10/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/python/versions/3.11.10/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/python/versions/3.11.10/lib/python3.11/site-packages/licensedcode/license_db.py", line 227, in dump_scancode_license_data
scancode_license_data(path=path)
File "/opt/python/versions/3.11.10/lib/python3.11/site-packages/licensedcode/license_db.py", line 204, in scancode_license_data
count = generate(build_location=path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/python/versions/3.11.10/lib/python3.11/site-packages/licensedcode/license_db.py", line 175, in generate
if not os.path.exists(build_location):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen genericpath>", line 19, in exists
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
The same happens on another machine with Python 3.13:
Dumping license data to: None
Traceback (most recent call last):
File "/usr/bin/scancode-license-data", line 8, in <module>
sys.exit(dump_scancode_license_data())
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.13/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.13/site-packages/licensedcode/license_db.py", line 227, in dump_scancode_license_data
scancode_license_data(path=path)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/licensedcode/license_db.py", line 204, in scancode_license_data
count = generate(build_location=path)
File "/usr/lib/python3.13/site-packages/licensedcode/license_db.py", line 175, in generate
if not os.path.exists(build_location):
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "<frozen genericpath>", line 19, in exists
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
System configuration
- What OS are you running on? Linux
- What version of scancode-toolkit was used to generate the scan file? 32.3.0
- What installation method was used to install/run scancode? Both RPM package on Fedora and
pip install
.