- Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Before You Begin
Before proceeding, please make sure to follow these steps:
- I have checked for similar issues in the project's issue tracker.
- I have searched closed issues to see if a similar problem was reported
before.
Issue Details
When running licensecheck, the CLI raises a traceback with error:
configparser.NoOptionError: No option 'classifiers' in section: 'metadata'
Description
licensecheck seems to only permit using the attribute classifiers
and not the alias classifier
.
However, the official documentation for setuptools lists classifier as an alias.
https://setuptools.pypa.io/en/latest/userguide/declarative_config.html#metadata
Expected Behavior
I'd expect licensecheck to treat classifier the same as classifiers metadata attribute. When changing my setup.cfg metadata from classifier
to classifiers
it works without error.
Actual Behavior
Erics-MacBook-Pro:precli ericwb$ licensecheck -f ansi -u requirements:requirements.txt Traceback (most recent call last): File "/Users/ericwb/.pyenv/versions/3.13.0/lib/python3.13/configparser.py", line 818, in get value = d[option] ~^^^^^^^^ File "/Users/ericwb/.pyenv/versions/3.13.0/lib/python3.13/collections/__init__.py", line 1016, in __getitem__ return self.__missing__(key) # support subclasses that define __missing__ ~~~~~~~~~~~~~~~~^^^^^ File "/Users/ericwb/.pyenv/versions/3.13.0/lib/python3.13/collections/__init__.py", line 1008, in __missing__ raise KeyError(key) KeyError: 'classifiers' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/ericwb/.pyenv/versions/3.13.0/bin/licensecheck", line 8, in <module> sys.exit(cli()) ~~~^^ File "/Users/ericwb/.pyenv/versions/3.13.0/lib/python3.13/site-packages/licensecheck/cli.py", line 86, in cli sysexit(main(args)) ~~~~^^^^^^ File "/Users/ericwb/.pyenv/versions/3.13.0/lib/python3.13/site-packages/licensecheck/cli.py", line 120, in main myLiceTxt = args["license"] if args.get("license") else packageinfo.getMyPackageLicense() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/Users/ericwb/.pyenv/versions/3.13.0/lib/python3.13/site-packages/licensecheck/packageinfo.py", line 184, in getMyPackageLicense metaData = getMyPackageMetadata() File "/Users/ericwb/.pyenv/versions/3.13.0/lib/python3.13/site-packages/licensecheck/packageinfo.py", line 159, in getMyPackageMetadata classifiers = config.get("metadata", "classifiers").strip().splitlines() ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ericwb/.pyenv/versions/3.13.0/lib/python3.13/configparser.py", line 821, in get raise NoOptionError(option, section) configparser.NoOptionError: No option 'classifiers' in section: 'metadata'
System Information
Please provide the following additional information about your system or
environment:
- Operating System (OS): macOS
- OS Version: Sequoia 15.3
- Browser (if applicable): n/a
- Browser Version (if applicable): n/a
- Project Version (if applicable): n/a
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working