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

Failed to run GitHubAPIImporter #1142

Closed
ziadhany opened this issue Mar 1, 2023 · 2 comments
Closed

Failed to run GitHubAPIImporter #1142

ziadhany opened this issue Mar 1, 2023 · 2 comments
Milestone

Comments

@ziadhany
Copy link
Collaborator

ziadhany commented Mar 1, 2023

Importing data using vulnerabilities.importers.github.GitHubAPIImporter
Traceback (most recent call last):
  File "/home/ziad/PycharmProjects/vulnerablecode/vulnerabilities/management/commands/import.py", line 60, in import_data
    ImportRunner(importer).run()
  File "/home/ziad/PycharmProjects/vulnerablecode/vulnerabilities/import_runner.py", line 44, in run
    count = process_advisories(advisory_datas=advisory_datas, importer_name=importer_name)
  File "/home/ziad/PycharmProjects/vulnerablecode/vulnerabilities/import_runner.py", line 54, in process_advisories
    for data in advisory_datas:
  File "/home/ziad/PycharmProjects/vulnerablecode/vulnerabilities/importers/github.py", line 181, in advisory_data
    yield from process_response(response, package_type=package_type)
  File "/home/ziad/PycharmProjects/vulnerablecode/vulnerabilities/importers/github.py", line 268, in process_response
    affected_range = build_range_from_github_advisory_constraint(
  File "/home/ziad/PycharmProjects/vulnerablecode/venv/lib/python3.10/site-packages/univers/version_range.py", line 1196, in build_range_from_github_advisory_constraint
    constraints.append(build_constraint_from_github_advisory_string(scheme, constraint))
  File "/home/ziad/PycharmProjects/vulnerablecode/venv/lib/python3.10/site-packages/univers/version_range.py", line 1165, in build_constraint_from_github_advisory_string
    version = vrc.version_class(version)
  File "<attrs generated init univers.versions.PypiVersion>", line 7, in __init__
    self.__attrs_post_init__()
  File "/home/ziad/PycharmProjects/vulnerablecode/venv/lib/python3.10/site-packages/univers/versions.py", line 87, in __attrs_post_init__
    raise InvalidVersion(f"{self.string!r} is not a valid {self.__class__!r}")
univers.versions.InvalidVersion: '10.0.2-1.1' is not a valid <class 'univers.versions.PypiVersion'>
Failed to run importer vulnerabilities.importers.github.GitHubAPIImporter. Continuing...
CommandError: 1 failed!: vulnerabilities.importers.github.GitHubAPIImporter
@TG1999
Copy link
Contributor

TG1999 commented Mar 15, 2023

@ziadhany this is fixed in #1149 please check and let us know.

@ziadhany
Copy link
Collaborator Author

Great it is working again, thanks

Importing data using vulnerabilities.importers.github.GitHubAPIImporter
Could not parse affected range '>= 10.0.0, < 10.0.2-1.1' InvalidVersion("'10.0.2-1.1' is not a valid <class 'univers.versions.PypiVersion'>")
Invalid fixed version '10.0.2-1.1' InvalidVersion("'10.0.2-1.1' is not a valid <class 'univers.versions.PypiVersion'>")
Could not parse affected range '>= 9.0.0, < 9.3.1-2.1' InvalidVersion("'9.3.1-2.1' is not a valid <class 'univers.versions.PypiVersion'>")
Invalid fixed version '9.3.1-2.1' InvalidVersion("'9.3.1-2.1' is not a valid <class 'univers.versions.PypiVersion'>")
Could not parse affected range '>= 8.0.0, < 8.3.0-11.1' InvalidVersion("'8.3.0-11.1' is not a valid <class 'univers.versions.PypiVersion'>")
Invalid fixed version '8.3.0-11.1' InvalidVersion("'8.3.0-11.1' is not a valid <class 'univers.versions.PypiVersion'>")
Could not parse affected range '< 7.2.0-12.1' InvalidVersion("'7.2.0-12.1' is not a valid <class 'univers.versions.PypiVersion'>")
Invalid fixed version '7.2.0-12.1' InvalidVersion("'7.2.0-12.1' is not a valid <class 'univers.versions.PypiVersion'>")
Successfully imported data using vulnerabilities.importers.github.GitHubAPIImporter

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

2 participants