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
Describe the bug
IndexError: list index out of range
To Reproduce
Steps to reproduce the behavior:
Run grayskull pypi fastbencode
See error
Expected behavior
Grayskull does not throw IndexError.
Outputs
Recovering license info from spdx.org ...
Traceback (most recent call last):
File "$HOME/micromamba/envs/cfstaging/bin/grayskull", line 10, in <module>
sys.exit(main())
^^^^^^
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/main.py", line 277, in main
generate_recipes_from_list(args.pypi_packages, args)
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/main.py", line 300, in generate_recipes_from_list
recipe, config = create_python_recipe(
^^^^^^^^^^^^^^^^^^^^^
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/main.py", line 335, in create_python_recipe
GrayskullFactory.create_recipe(
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/base/factory.py", line 46, in create_recipe
GrayskullFactory.REGISTERED_STRATEGY[repo_type.lower()].fetch_data(
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/strategy/pypi.py", line 62, in fetch_data
update_recipe(recipe, config, sections or ALL_SECTIONS)
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/strategy/pypi.py", line 499, in update_recipe
metadata = get_metadata(recipe, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/strategy/pypi.py", line 357, in get_metadata
all_license_metadata = discover_license(metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/strategy/py_base.py", line 571, in discover_license
return search_license_file(
^^^^^^^^^^^^^^^^^^^^
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/license/discovery.py", line 225, in search_license_file
license_name_metadata = get_short_license_id(license_name_metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/license/discovery.py", line 129, in get_short_license_id
recipe_license = match_license(name)
^^^^^^^^^^^^^^^^^^^
File "$HOME/micromamba/envs/cfstaging/lib/python3.12/site-packages/grayskull/license/discovery.py", line 105, in match_license
if original_matches[0][1] < 0.55:
~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
I have this same bug. With some inspection I find:
> /home/larsoner/python/virtualenvs/base/lib/python3.11/site-packages/grayskull/license/discovery.py(129)get_short_license_id()
-> recipe_license = match_license(name)
(Pdb) p name
'GPLv3'
Describe the bug
IndexError: list index out of range
To Reproduce
Steps to reproduce the behavior:
grayskull pypi fastbencode
Expected behavior
Grayskull does not throw IndexError.
Outputs
Environment:
Additional context
The text was updated successfully, but these errors were encountered: