Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-22607

Unable to install Python package name with bad characters (spaces)

    Details

    • Type: Bug
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.20.1
    • Fix Version/s: None
    • Component/s: PyPI
    • Labels:
    • Environment:
      Linux, Debian (Jessie)

      Description

      Full pip output when installing Sphinx-Substitution-Extensions:

      pip install -v Sphinx-Substitution-Extensions
      Created temporary directory: /private/var/folders/b_/l1m2c1r50bz92q5f7khcj96h0000gn/T/pip-ephem-wheel-cache-nizdbrq3
      Created temporary directory: /private/var/folders/b_/l1m2c1r50bz92q5f7khcj96h0000gn/T/pip-req-tracker-ef5entm5
      Created requirements tracker '/private/var/folders/b_/l1m2c1r50bz92q5f7khcj96h0000gn/T/pip-req-tracker-ef5entm5'
      Created temporary directory: /private/var/folders/b_/l1m2c1r50bz92q5f7khcj96h0000gn/T/pip-install-7kpk98jx
      Looking in indexes: https://sonatype3/repository/pypi-production/simple
      Collecting Sphinx-Substitution-Extensions
        1 location(s) to search for versions of Sphinx-Substitution-Extensions:
        * https://sonatype3/repository/pypi-production/simple/sphinx-substitution-extensions/
        Getting page https://sonatype3/repository/pypi-production/simple/sphinx-substitution-extensions/
        Looking up "https://sonatype3/repository/pypi-production/simple/sphinx-substitution-extensions/" in the cache
        Request header has "max_age" as 0, cache bypassed
        Starting new HTTPS connection (1): sonatype3:443
        https://sonatype3:443 "GET /repository/pypi-production/simple/sphinx-substitution-extensions/ HTTP/1.1" 500 2227
        Incremented Retry for (url='/repository/pypi-production/simple/sphinx-substitution-extensions/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
        Retry: /repository/pypi-production/simple/sphinx-substitution-extensions/
        https://sonatype3:443 "GET /repository/pypi-production/simple/sphinx-substitution-extensions/ HTTP/1.1" 500 2227
        Incremented Retry for (url='/repository/pypi-production/simple/sphinx-substitution-extensions/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
        Retry: /repository/pypi-production/simple/sphinx-substitution-extensions/
        https://sonatype3:443 "GET /repository/pypi-production/simple/sphinx-substitution-extensions/ HTTP/1.1" 500 2227
        Incremented Retry for (url='/repository/pypi-production/simple/sphinx-substitution-extensions/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
        Retry: /repository/pypi-production/simple/sphinx-substitution-extensions/
        https://sonatype3:443 "GET /repository/pypi-production/simple/sphinx-substitution-extensions/ HTTP/1.1" 500 2227
        Incremented Retry for (url='/repository/pypi-production/simple/sphinx-substitution-extensions/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
        Retry: /repository/pypi-production/simple/sphinx-substitution-extensions/
        https://sonatype3:443 "GET /repository/pypi-production/simple/sphinx-substitution-extensions/ HTTP/1.1" 500 2227
        Incremented Retry for (url='/repository/pypi-production/simple/sphinx-substitution-extensions/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
        Retry: /repository/pypi-production/simple/sphinx-substitution-extensions/
        https://sonatype3:443 "GET /repository/pypi-production/simple/sphinx-substitution-extensions/ HTTP/1.1" 500 2227
        Could not fetch URL https://sonatype3/repository/pypi-production/simple/sphinx-substitution-extensions/: HTTPSConnectionPool(host='sonatype3', port=443): Max retries exceeded with url: /repository/pypi-production/simple/sphinx-substitution-extensions/ (Caused by ResponseError('too many 500 error responses',)) - skipping
        Could not find a version that satisfies the requirement Sphinx-Substitution-Extensions (from versions: )
      Cleaning up...
      Removed build tracker '/private/var/folders/b_/l1m2c1r50bz92q5f7khcj96h0000gn/T/pip-req-tracker-ef5entm5'
      No matching distribution found for Sphinx-Substitution-Extensions
      Exception information:
      Traceback (most recent call last):
        File "/Users/fleow/IdeaProjects/sb-connect/venv/lib/python3.5/site-packages/pip/_internal/cli/base_command.py", line 179, in main
          status = self.run(options, args)
        File "/Users/fleow/IdeaProjects/sb-connect/venv/lib/python3.5/site-packages/pip/_internal/commands/install.py", line 315, in run
          resolver.resolve(requirement_set)
        File "/Users/fleow/IdeaProjects/sb-connect/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 131, in resolve
          self._resolve_one(requirement_set, req)
        File "/Users/fleow/IdeaProjects/sb-connect/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
          abstract_dist = self._get_abstract_dist_for(req_to_install)
        File "/Users/fleow/IdeaProjects/sb-connect/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
          self.require_hashes
        File "/Users/fleow/IdeaProjects/sb-connect/venv/lib/python3.5/site-packages/pip/_internal/operations/prepare.py", line 269, in prepare_linked_requirement
          req.populate_link(finder, upgrade_allowed, require_hashes)
        File "/Users/fleow/IdeaProjects/sb-connect/venv/lib/python3.5/site-packages/pip/_internal/req/req_install.py", line 196, in populate_link
          self.link = finder.find_requirement(self, upgrade)
        File "/Users/fleow/IdeaProjects/sb-connect/venv/lib/python3.5/site-packages/pip/_internal/index.py", line 688, in find_requirement
          'No matching distribution found for %s' % req
      pip._internal.exceptions.DistributionNotFound: No matching distribution found for Sphinx-Substitution-Extensions
      You are using pip version 19.0.3, however version 20.0.1 is available.
      You should consider upgrading via the 'pip install --upgrade pip' command. 

      In the Nexus logs:

      2020-01-23 10:17:57,656-0800 WARN  [qtp722764272-47881]  *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/pypi-production/simple/sphinx-substitution-extensions/2020-01-23 10:17:57,656-0800 WARN  [qtp722764272-47881]  *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/pypi-production/simple/sphinx-substitution-extensions/java.lang.IllegalArgumentException: Illegal character in path at index 82: packages/5d/07/ec7c52ec15910c06f4e6918210ac21ae490137c888e7acb1750cd0d17f42/Sphinx Substitution Extensions-2018.11.12.1.tar.gz at java.net.URI.create(URI.java:852) at java.net.URI.resolve(URI.java:1036) at org.sonatype.nexus.repository.pypi.internal.PyPiIndexUtils.rewriteAbsoluteUri(PyPiIndexUtils.java:215) at org.sonatype.nexus.repository.pypi.internal.PyPiIndexUtils.rewriteLink(PyPiIndexUtils.java:203) at org.sonatype.nexus.repository.pypi.internal.PyPiIndexUtils.lambda$0(PyPiIndexUtils.java:179) at org.sonatype.nexus.repository.pypi.internal.PyPiIndexUtils.makeLinksRelative(PyPiIndexUtils.java:155) at org.sonatype.nexus.repository.pypi.internal.PyPiIndexUtils.makePackageLinksRelative(PyPiIndexUtils.java:179) at org.sonatype.nexus.repository.pypi.internal.PyPiIndexUtils.makeIndexRelative(PyPiIndexUtils.java:169) at org.sonatype.nexus.repository.pypi.internal.PyPiProxyFacetImpl.putIndex(PyPiProxyFacetImpl.java:282) 
      Caused by: java.net.URISyntaxException: Illegal character in path at index 82: packages/5d/07/ec7c52ec15910c06f4e6918210ac21ae490137c888e7acb1750cd0d17f42/Sphinx Substitution Extensions-2018.11.12.1.tar.gz at java.net.URI$Parser.fail(URI.java:2848) at java.net.URI$Parser.checkChars(URI.java:3021) at java.net.URI$Parser.parseHierarchical(URI.java:3105) at java.net.URI$Parser.parse(URI.java:3063) at java.net.URI.<init>(URI.java:588) at java.net.URI.create(URI.java:850) ... 185 common frames omitted 

      For context, only the upstream tar.gz has spaces in the file name. The wheel appears to use underscores.

      https://pypi.org/project/Sphinx-Substitution-Extensions/#files
      https://files.pythonhosted.org/packages/a2/a5/182930b570f893e4e06ad491121ea78391ca1a6b7c42ca15e212c3c7aea3/Sphinx%20Substitution%20Extensions-2019.12.28.0.tar.gz

      Overriding to --index-url=https://pypi.python.org/simple/ works so this only appears to affect the latest version of Nexus.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            eweiser-pandora Elliot Weiser
            Last Updated By:
            Joe Tom Joe Tom
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title