Skip to content
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

pkg_resources.DistributionNotFound: The 'None' distribution was not found and is required by the application #33

Open
egegunes opened this issue Jul 18, 2019 · 4 comments

Comments

@egegunes
Copy link

I get the following error when I try to run liccheck -s strategy.ini -r requirements.txt:

gathering licenses...
Traceback (most recent call last):
  File "/home/egegunes/Dev/arcelik/3d-backend/venv/bin/liccheck", line 11, in <module>
    load_entry_point('liccheck==0.3.12', 'console_scripts', 'liccheck')()
  File "/home/egegunes/Dev/arcelik/3d-backend/venv/lib64/python3.7/site-packages/liccheck/command_line.py", line 264, in main
    sys.exit(run(args))
  File "/home/egegunes/Dev/arcelik/3d-backend/venv/lib64/python3.7/site-packages/liccheck/command_line.py", line 259, in run
    return process(args.requirement_txt_file, strategy, args.level)
  File "/home/egegunes/Dev/arcelik/3d-backend/venv/lib64/python3.7/site-packages/liccheck/command_line.py", line 182, in process
    pkg_info = get_packages_info(requirement_file)
  File "/home/egegunes/Dev/arcelik/3d-backend/venv/lib64/python3.7/site-packages/liccheck/command_line.py", line 103, in get_packages_info
    packages = [transform(dist) for dist in pkg_resources.working_set.resolve(requirements)]
  File "/home/egegunes/Dev/arcelik/3d-backend/venv/lib64/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'None' distribution was not found and is required by the application

strategy.ini

# Authorized and unauthorized licenses in LOWER CASE
[Licenses]
authorized_licenses:
        bsd
        new bsd
        bsd license
        new bsd license
        simplified bsd
        apache
        apache 2.0
        apache software license
        gnu lgpl
        lgpl with exceptions or zpl
        isc license
        isc license (iscl)
        mit
        mit license
        python software foundation license
        zpl 2.1

unauthorized_licenses:
        gpl v3

requirements.txt

applicationinsights
azure-batch==6.0.0
azure-storage-blob==1.4.0
celery==4.2.1
Django==2.2
django-cors-headers==2.4.0
django-environ==0.4.5
djangorestframework==3.9.0
gunicorn
psycopg2-binary
requests
whitenoise

git+https://github.com/jazzband/django-oauth-toolkit.git@846ab0ba8acaa3e4870b424700544aa6329511e4
@fumpierrez
Copy link

fumpierrez commented Jul 29, 2019

Same issue, doesn't work for me even for the example on python 2.7
Seems to work on python 3.7

@MadhavVij
Copy link

I have the same issue, but on further inspection, I found that I had "-e ." flag in my requirements.txt which was causing the error.

I still think this is an issue and needs attention.

@mo-matt-p
Copy link

Works OK for me in liccheck==0.3.12 when I add a suffix #egg=package-name.
Working:

git+https://github.com/OWNER/foo-bar.git#egg=foo-bar

Not working:

git+https://github.com/OWNER/foo-bar.git

@JoelClemence
Copy link

Works OK for me in liccheck==0.3.12 when I add a suffix #egg=package-name.
Working:

git+https://github.com/OWNER/foo-bar.git#egg=foo-bar

Not working:

git+https://github.com/OWNER/foo-bar.git

I had this issue too and your fix helped thanks. I wonder if it should be documented in the readme for Github pip dependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants