Giter Club home page Giter Club logo

Comments (2)

craigds avatar craigds commented on July 21, 2024 1

We're having a very similar issue (though, a slightly different error) with the zope packages, which pip-tools 6.5.0+ (and thus dependabot) are now normalising from zope.interface to zope-interface. A minimal repro is:

python3 -m venv liccheck-test
. liccheck-test/bin/activate
pip install liccheck
echo 'zope-interface' > requirements.txt
pip install -r requirements.txt
echo '[Licenses]
authorized_licenses:
    zope public' > licenses.ini
liccheck -s licenses.ini -l cautious -r requirements.txt --no-deps

Which has the following output:

gathering licenses...
Traceback (most recent call last):
  File "/Users/cdestigter/liccheck-test/bin/liccheck", line 8, in <module>
    sys.exit(main())
  File "/Users/cdestigter/liccheck-test/lib/python3.9/site-packages/liccheck/command_line.py", line 344, in main
    sys.exit(run(args))
  File "/Users/cdestigter/liccheck-test/lib/python3.9/site-packages/liccheck/command_line.py", line 339, in run
    return process(args.requirement_txt_file, strategy, args.level, args.reporting_txt_file, args.no_deps)
  File "/Users/cdestigter/liccheck-test/lib/python3.9/site-packages/liccheck/command_line.py", line 249, in process
    pkg_info = get_packages_info(requirement_file, no_deps)
  File "/Users/cdestigter/liccheck-test/lib/python3.9/site-packages/liccheck/command_line.py", line 165, in get_packages_info
    packages = [transform(dist) for dist in resolve_func(requirements)]
  File "/Users/cdestigter/liccheck-test/lib/python3.9/site-packages/liccheck/command_line.py", line 165, in <listcomp>
    packages = [transform(dist) for dist in resolve_func(requirements)]
  File "/Users/cdestigter/liccheck-test/lib/python3.9/site-packages/liccheck/command_line.py", line 119, in transform
    licenses = get_licenses_from_classifiers(dist) or get_license(dist) or []
  File "/Users/cdestigter/liccheck-test/lib/python3.9/site-packages/liccheck/command_line.py", line 145, in get_licenses_from_classifiers
    if dist.has_metadata(dist.PKG_INFO):
AttributeError: 'NoneType' object has no attribute 'has_metadata'

from python-license-check.

LiquidLemon avatar LiquidLemon commented on July 21, 2024

This has now been resolved upstream in setuptools (pypa/setuptools#3153) and is no longer an issue with setuptools >= 62.0.0.

from python-license-check.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.