-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tern fails with ScanCode parsing error #1063
Labels
bug
Something went wrong
Comments
I can reproduce this. Working on a fix. |
rnjudge
added a commit
to rnjudge/tern
that referenced
this issue
Jan 21, 2022
When running Tern with Scancode, Tern tries to parse Scancode's `declared_license` dictionary `license` key to determine the package license. Sometimes this key is called `License` and sometimes the `declared_license` dictionary is empty, however. In each of the aforementioned cases Tern fails and throws a `KeyError`. This commit fixes the error by checking for an empty dictionary before trying to extract the license value and also checks for the `License` key in addition to the `license` key. Note that an issue[1] has been opened in the scancode repository asking for clarity on whether the declared_license key should be `License` or `license`. If any resolution comes from the scancode issue that has been opened, it may make sense to revert parts of this change. [1] nexB/scancode-toolkit#2803 Resolves tern-tools#1063 Signed-off-by: Rose Judge <rjudge@vmware.com>
rnjudge
added a commit
to rnjudge/tern
that referenced
this issue
Jan 21, 2022
When running Tern with Scancode, Tern tries to parse Scancode's `declared_license` dictionary `license` key to determine the package license. Sometimes this key is called `License` and sometimes the `declared_license` dictionary is empty, however. In each of the aforementioned cases Tern fails and throws a `KeyError`. This commit fixes the error by checking for an empty dictionary before trying to extract the license value and also checks for the `License` key in addition to the `license` key. Note that an issue[1] has been opened in the scancode repository asking for clarity on whether the declared_license key should be `License` or `license`. If any resolution comes from the scancode issue that has been opened, it may make sense to revert parts of this change. [1] nexB/scancode-toolkit#2803 Resolves tern-tools#1063 Signed-off-by: Rose Judge <rjudge@vmware.com>
rnjudge
added a commit
to rnjudge/tern
that referenced
this issue
Jan 21, 2022
When running Tern with Scancode, Tern tries to parse Scancode's `declared_license` dictionary `license` key to determine the package license. Sometimes this key is called `License` and sometimes the `declared_license` dictionary is empty, however. In each of the aforementioned cases Tern fails and throws a `KeyError`. This commit fixes the error by checking for an empty dictionary before trying to extract the license value and also checks for the `License` key in addition to the `license` key. Note that an issue[1] has been opened in the scancode repository asking for clarity on whether the declared_license key should be `License` or `license`. If any resolution comes from the scancode issue that has been opened, it may make sense to revert parts of this change. [1] nexB/scancode-toolkit#2803 Resolves tern-tools#1063 Signed-off-by: Rose Judge <rjudge@vmware.com>
rnjudge
added a commit
to rnjudge/tern
that referenced
this issue
Jan 21, 2022
When running Tern with Scancode, Tern tries to parse Scancode's `declared_license` dictionary `license` key to determine the package license. Sometimes this key is called `License` and sometimes the `declared_license` dictionary is empty, however. In each of the aforementioned cases Tern fails and throws a `KeyError`. This commit fixes the error by checking for an empty dictionary before trying to extract the license value and also checks for the `License` key in addition to the `license` key. Note that an issue[1] has been opened in the scancode repository asking for clarity on whether the declared_license key should be `License` or `license`. If any resolution comes from the scancode issue that has been opened, it may make sense to revert parts of this change. [1] nexB/scancode-toolkit#2803 Resolves tern-tools#1063 Signed-off-by: Rose Judge <rjudge@vmware.com>
nishakm
pushed a commit
that referenced
this issue
Jan 21, 2022
When running Tern with Scancode, Tern tries to parse Scancode's `declared_license` dictionary `license` key to determine the package license. Sometimes this key is called `License` and sometimes the `declared_license` dictionary is empty, however. In each of the aforementioned cases Tern fails and throws a `KeyError`. This commit fixes the error by checking for an empty dictionary before trying to extract the license value and also checks for the `License` key in addition to the `license` key. Note that an issue[1] has been opened in the scancode repository asking for clarity on whether the declared_license key should be `License` or `license`. If any resolution comes from the scancode issue that has been opened, it may make sense to revert parts of this change. [1] nexB/scancode-toolkit#2803 Resolves #1063 Signed-off-by: Rose Judge <rjudge@vmware.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When scanning
tomcat:10.0.6-jdk11-openjdk-buster
with Tern, it fails after some time with the following output:To Reproduce
Steps to reproduce the behavior:
-x scancode
ontomcat:10.0.6-jdk11-openjdk-buster
and waitEnvironment you are running Tern on
executed in dockerized environment. Observed both in container build from
docker/Dockerfile.scancode
and in a custom docker image.tern.log
The text was updated successfully, but these errors were encountered: