Movatterモバイル変換


[0]ホーム

URL:


Log in / Register

Snapcraft

Error installing Python packages fails with trace

Bug #1753965 reported byCris Dywan
This bug affects 1 person
AffectsStatusImportanceAssigned toMilestone
Snapcraft
Confirmed
High
Sergio Schvezov

Bug Description

When using the Python plugin and there's a problem installing a Python package, Snapcraft aborts with both a verbatim error message from pip as well as a long trace.

There's 3 ways to get this to happen which go through the same code path which is why I'm filing one bug for it:
 - A package from index (PyPI) can't be installed.
 - The URL to a VCS branch can't be cloned.
 - An error occurs downloading via http(s) eg. HTTP 404.

parts:
  foo:
    plugin: python
    python-packages:
     - <email address hidden>:kalikiana/does-not-exist.git#egg=ham
     -http://someserver.org/packages/MyPackage-3.0.tar.gz

See below for abbreviated traces going through "Pip.download":

Collecting pip
  Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip
Traceback (most recent call last):
[...]
  File "/home/rumo/dev/snapcraft/snapcraft/plugins/_python/_pip.py", line 196, in _ensure_pip_installed
    self.download({'pip'})
[...]
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)

Invalid requirement: '<email address hidden>:kalikiana/does-not-exist.git'
It looks like a path. Does it exist ?
Traceback (most recent call last):
[...]
  File "/home/rumo/dev/snapcraft/snapcraft/plugins/_python/_pip.py", line 275, in download
    self._python_package_dir] + args, cwd=cwd)
[...]
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)

Collectinghttp://someserver.org/packages/MyPackage-3.0.tar.gz
  HTTP error 404 while gettinghttp://someserver.org/packages/MyPackage-3.0.tar.gz
  Could not install requirementhttp://someserver.org/packages/MyPackage-3.0.tar.gz because of error 404 Client Error: Not Found for url:http://someserver.org/packages/MyPackage-3.0.tar.gz
Could not install requirementhttp://someserver.org/packages/MyPackage-3.0.tar.gz because of HTTP error 404 Client Error: Not Found for url:http://someserver.org/packages/MyPackage-3.0.tar.gz for URLhttp://someserver.org/packages/MyPackage-3.0.tar.gz
Traceback (most recent call last):
[...]
  File "/home/rumo/dev/snapcraft/snapcraft/plugins/_python/_pip.py", line 275, in download
    self._python_package_dir] + args, cwd=cwd)
[...]
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)

Revision history for this message
Sergio Schvezov (sergiusens) wrote:
Changed in snapcraft:
importance: Undecided → High
status: New → In Progress
assignee: nobody → Sergio Schvezov (sergiusens)
Changed in snapcraft:
status: In Progress → Fix Committed
Revision history for this message
Cris Dywan (kalikiana) wrote:

This isn't fixed unfortunately because the internal _pip module uses snapcraft.internal.common.run directly rather than the run/run/output methods of the plugin.

Changed in snapcraft:
status: Fix Committed → Confirmed
To post a comment you mustlog in.
This report containsPublic information 
Everyone can see this information.
      Subscribing...

      Other bug subscribers

      Remote bug watches

        Bug watches keep track of this bug in other bug trackers.

        Launchpad  • Take the tour  • Read the guide  
        © 2004Canonical Ltd.  • Terms of use  • Data privacy  • Contact Launchpad Support  • Blog  • Careers  • System status  •  0cf96b7 (Get the code!)

        [8]ページ先頭

        ©2009-2026 Movatter.jp