You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed Fossology v4.1.0 from sources some time ago and it is working well, even with Scancode. The installed (working) version of Scancode was 30.1.0.
However, I created a new instance of Fossology v4.1.0 (always installing it from sources) and Scancode is not working any more with Fossology Scancode Agent:
click here to see the job log
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "ERROR: failed to run output plugin: template:"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "Traceback (most recent call last):"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/scancode/cli.py", line 1079, in run_codebase_plugins"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " plugin.process_codebase(codebase, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/formattedcode/output_html.py", line 102, in process_codebase"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " write_templated(output_file, results, version, template_loc)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/formattedcode/output_html.py", line 113, in write_templated"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " for template_chunk in generate_output(results, version, template):"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/environment.py", line 1354, in generate"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " yield self.environment.handle_exception()"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/environment.py", line 936, in handle_exception"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " raise rewrite_traceback_stack(source=source)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/local/share/fossology/scancode/agent/scancode_template.html", line 64, in top-level template code"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " "value": {{ data.value|tojson }},"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/filters.py", line 1688, in do_tojson"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " return htmlsafe_json_dumps(value, dumps=dumps, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/utils.py", line 658, in htmlsafe_json_dumps"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " dumps(obj, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " **kw).encode(obj)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 199, in encode"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " chunks = self.iterencode(o, _one_shot=True)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " return _iterencode(o, 0)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 179, in default"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " raise TypeError(f'Object of type {o.__class__.__name__} '"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "TypeError: Object of type Undefined is not JSON serializable"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "ERROR: failed to run output plugin: template:"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "Traceback (most recent call last):"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/scancode/cli.py", line 1079, in run_codebase_plugins"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " plugin.process_codebase(codebase, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/formattedcode/output_html.py", line 102, in process_codebase"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " write_templated(output_file, results, version, template_loc)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/formattedcode/output_html.py", line 113, in write_templated"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " for template_chunk in generate_output(results, version, template):"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/environment.py", line 1354, in generate"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " yield self.environment.handle_exception()"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/environment.py", line 936, in handle_exception"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " raise rewrite_traceback_stack(source=source)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/local/share/fossology/scancode/agent/scancode_template.html", line 64, in top-level template code"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " "value": {{ data.value|tojson }},"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/filters.py", line 1688, in do_tojson"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " return htmlsafe_json_dumps(value, dumps=dumps, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/utils.py", line 658, in htmlsafe_json_dumps"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " dumps(obj, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " **kw).encode(obj)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 199, in encode"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " chunks = self.iterencode(o, _one_shot=True)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " return _iterencode(o, 0)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 179, in default"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " raise TypeError(f'Object of type {o.__class__.__name__} '"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "TypeError: Object of type Undefined is not JSON serializable"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "ERROR: failed to run output plugin: template:"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "Traceback (most recent call last):"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/scancode/cli.py", line 1079, in run_codebase_plugins"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " plugin.process_codebase(codebase, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/formattedcode/output_html.py", line 102, in process_codebase"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " write_templated(output_file, results, version, template_loc)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/formattedcode/output_html.py", line 113, in write_templated"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " for template_chunk in generate_output(results, version, template):"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/environment.py", line 1354, in generate"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " yield self.environment.handle_exception()"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/environment.py", line 936, in handle_exception"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " raise rewrite_traceback_stack(source=source)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/local/share/fossology/scancode/agent/scancode_template.html", line 64, in top-level template code"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " "value": {{ data.value|tojson }},"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/filters.py", line 1688, in do_tojson"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " return htmlsafe_json_dumps(value, dumps=dumps, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/utils.py", line 658, in htmlsafe_json_dumps"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " dumps(obj, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " **kw).encode(obj)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 199, in encode"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " chunks = self.iterencode(o, _one_shot=True)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " return _iterencode(o, 0)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 179, in default"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " raise TypeError(f'Object of type {o.__class__.__name__} '"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "TypeError: Object of type Undefined is not JSON serializable"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "NOTICE scancode_wrapper.cc.151: No license found"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "NOTICE scancode_wrapper.cc.151: No license found"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "NOTICE scancode_wrapper.cc.151: No license found"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "NOTICE scancode_wrapper.cc.151: No license found"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "ERROR: failed to run output plugin: template:"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "Traceback (most recent call last):"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/scancode/cli.py", line 1079, in run_codebase_plugins"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " plugin.process_codebase(codebase, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/formattedcode/output_html.py", line 102, in process_codebase"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " write_templated(output_file, results, version, template_loc)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/formattedcode/output_html.py", line 113, in write_templated"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " for template_chunk in generate_output(results, version, template):"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/environment.py", line 1354, in generate"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " yield self.environment.handle_exception()"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/environment.py", line 936, in handle_exception"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " raise rewrite_traceback_stack(source=source)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/local/share/fossology/scancode/agent/scancode_template.html", line 64, in top-level template code"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " "value": {{ data.value|tojson }},"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/filters.py", line 1688, in do_tojson"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " return htmlsafe_json_dumps(value, dumps=dumps, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/home/fossy/pythondeps/jinja2/utils.py", line 658, in htmlsafe_json_dumps"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " dumps(obj, **kwargs)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " **kw).encode(obj)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 199, in encode"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " chunks = self.iterencode(o, _one_shot=True)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " return _iterencode(o, 0)"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " File "/usr/lib/python3.7/json/encoder.py", line 179, in default"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: " raise TypeError(f'Object of type {o.__class__.__name__} '"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "TypeError: Object of type Undefined is not JSON serializable"
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: "FATAL scancode_wrapper.cc.106: could not execute scancode command: PYTHONPATH='/home/fossy/pythondeps/' SCANCODE_CACHE=/var/local/cache/fossology/scancode /home/fossy/pythondeps/bin/scancode -lceu --custom-output - --custom-template scancode_template.html /srv/fossology/repository/localhost/files/64/78/7f/64787face2d527df6c78ba8754eb54c53dda6ac2.315c9e3e7dd1d24aeb9d6bc55b7de5fd.1847 --quiet --license-text --license-score 50 "
2022-10-04 18:28:59 scancode [0] :: JOB[13].scancode[7818.localhost]: agent failed with error code 1
2022-10-04 18:29:00 scancode [0] :: JOB[13].scancode[7818.localhost]: agent failed, code: 1
I checked the installed Scancode version, which is now 31.1.0.
I tried to downgrade Scancode to version 30.1.0, and it works.
click for the commands I used to downgrade Scancode
So the issue is apparently due to the newer version of Scancode.
Installer should install a pinned version of Scancode (and of its dependencies, that sometimes are not pinned in Scancode itself) instead of installing the latest, unpinned version.
How to reproduce
Install Fossology v4.1.0 (or any other more recent version) from sources. Upload a package and schedule Scancode Agent. Check the logs of the job (failure)
Downgrade Scancode to v 30.1.0 (see commands above). Upload another package and schedule Scancode Agent. Check the logs of the job (success)
Screenshots
See above
Versions
4.1.0+
Debian 10 (but should apply also to other linux distros)
Job logs
See above
The text was updated successfully, but these errors were encountered:
alpianon
changed the title
Scancode not working any more with fossology (Installer installs latest/unpinned version of Scancode)
Scancode not working any more with Fossology (Installer installs latest/unpinned version of Scancode)
Oct 6, 2022
Description
I installed Fossology v4.1.0 from sources some time ago and it is working well, even with Scancode. The installed (working) version of Scancode was 30.1.0.
However, I created a new instance of Fossology v4.1.0 (always installing it from sources) and Scancode is not working any more with Fossology Scancode Agent:
click here to see the job log
I checked the installed Scancode version, which is now 31.1.0.
I tried to downgrade Scancode to version 30.1.0, and it works.
click for the commands I used to downgrade Scancode
So the issue is apparently due to the newer version of Scancode.
Installer should install a pinned version of Scancode (and of its dependencies, that sometimes are not pinned in Scancode itself) instead of installing the latest, unpinned version.
How to reproduce
Install Fossology v4.1.0 (or any other more recent version) from sources. Upload a package and schedule Scancode Agent. Check the logs of the job (failure)
Downgrade Scancode to v 30.1.0 (see commands above). Upload another package and schedule Scancode Agent. Check the logs of the job (success)
Screenshots
See above
Versions
Job logs
See above
The text was updated successfully, but these errors were encountered: