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

import headers show error while running the python files #2

Open
HaripriyaB opened this issue Jun 15, 2020 · 1 comment
Open

import headers show error while running the python files #2

HaripriyaB opened this issue Jun 15, 2020 · 1 comment

Comments

@HaripriyaB
Copy link

When the installation was done as per the instructions in the README.md file the following error occurred:

Traceback (most recent call last):
  File "build_licenses.py", line 6, in <module>
    from .normalize import normalize
ImportError: attempted relative import with no known parent package

Note: The similar issue was occurring for all the python files. Possible cause of this error was the import format :

from .normalize import normalize
from .utils import compressStringToBytes

Due to the dot after the python files name it was showing error.

Version : Python 3.7.7

@kkoehne
Copy link

kkoehne commented Jul 15, 2020

I had the same issue. A workaround is to not run the .py files directly, but from top directory:

python -m spdx_license_matcher.matcher

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

Successfully merging a pull request may close this issue.

2 participants