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
Traceback (most recent call last):
File "/Users/zkoppert/repos/innersource-crawler/./crawler.py", line 87, in <module>
innersource_repo["score"] = repo_activity.score.calculate(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/repo_activity/score.py", line 54, in calculate
len(repo["description"]) > 30
^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Possible solution:
Check also is description exist or no?
For example, add condition repo["description"] is not None:
# give projects with a meaningful description a static boost of 50
if (
# add there
repo["description"] is not None and
len(repo["description"]) > 30
and repo["_InnerSourceMetadata"]
or (
"motivation" in repo["_InnerSourceMetadata"]
and repo["_InnerSourceMetadata"]["motivation"].length > 30
)
):
iScore += 50
The text was updated successfully, but these errors were encountered:
History
Hello, I work on one of issues, where one error/bug was found in ur library.
Description
If we try to calculate score of repo without description - it raise error.
Example of code:
Error:
Possible solution:
Check also is description exist or no?
For example, add condition
repo["description"] is not None
:The text was updated successfully, but these errors were encountered: