-
Notifications
You must be signed in to change notification settings - Fork 188
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 in license_expression #1203
Comments
Same issue as: #1199 -- I will create a workaround until the license_expression library can fix it (aboutcode-org/license-expression#76) |
A fix was previously made to catch a few specific invalid license characters (48e22cf). Because there can be a high number of invalid license characters, instead of trying to replace them all, this commit adds a try/catch statement to catch the AttributeError exception that gets thrown by license_expression when there is an invalid license character. Resolves tern-tools#1203 Signed-off-by: Rose Judge <[email protected]>
@rnjudge as mentioned in aboutcode-org/license-expression#76 and in aboutcode-org/license-expression#70 you should IMHO call scancode toolkit directly to get a proper license detection. The license expression library is not the license detection engine. |
@pombredanne thanks for your input! Unfortunately, I don't know when I will have cycles to upgrade the license detection to Scancode and given that I can't even install Scancode on my M1 right now, I am hesitant to add it as a hard requirement for Tern users that also may be using M1s. Also, recent scancode updates appear to have broken Tern's parsing of scancode data so again hesitant to embed scancode in Tern when breaking changes cascade down to us. That being said, I do still want to look at what Scancode can offer here and see what we can do to improve license detection in Tern. |
A fix was previously made to catch a few specific invalid license characters (48e22cf). Because there can be a high number of invalid license characters, instead of trying to replace them all, this commit adds a try/catch statement to catch the AttributeError exception that gets thrown by license_expression when there is an invalid license character. Resolves #1203 Signed-off-by: Rose Judge <[email protected]>
For anyone else still hitting this, it looks like this hasn't made it into a PyPi release. |
Hi @timbrown5 I am hoping to cut a release with this fix soon. I've been waiting on @pombredanne and the Scancode team to fix/offer a workaround for aboutcode-org/scancode-toolkit#3205 so I could also include a fix for #1202 but it may be a while for that. Stay tuned in the next few weeks for a patched release. |
Describe the bug
Tern fails with the following command:
Error in terminal
Expected behavior
Tern should not fail.
Environment you are running Tern on
Enter all that apply
The text was updated successfully, but these errors were encountered: