Skip to content

Package URL encoding should be dealt correctly #65

Description

@pombredanne
>>> from fetchcode import package
>>> list(package.info('pkg:npm/@babel/babel-runtime'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "w421/fetchcode/src/fetchcode/package.py", line 117, in get_npm_data_from_purl
    purl = PackageURL.from_string(purl)
  File "w421/fetchcode/tmp/lib/python3.6/site-packages/packageurl/__init__.py", line 408, in from_string
    'name component: {}'.format(repr(purl)))
ValueError: purl is missing the required name component: 'pkg:npm/@babel/babel-runtime'

fails...
but IMHO it should work
this works:

list(package.info('pkg:npm/%40babel/babel-runtime'))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions