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

FTP download install failed #1532

Closed
lucmult opened this issue Feb 6, 2014 · 12 comments
Closed

FTP download install failed #1532

lucmult opened this issue Feb 6, 2014 · 12 comments
Labels
auto-locked Outdated issues that have been locked by automation type: docs Documentation related
Milestone

Comments

@lucmult
Copy link

lucmult commented Feb 6, 2014

(venv)ubuntu@box31:~/bex$ pip install ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.9.tar.gz
Downloading/unpacking ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.9.tar.gz
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 274, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/req.py", line 1173, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/req.py", line 1320, in unpack_url
    retval = unpack_http_url(link, location, self.download_cache, self.download_dir, self.session)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/download.py", line 555, in unpack_http_url
    resp = session.get(target_url, stream=True)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 395, in get
    return self.request('GET', url, **kwargs)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/download.py", line 237, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 481, in send
    adapter = self.get_adapter(url=request.url)
  File "/home/ubuntu/bex/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 526, in get_adapter
    raise InvalidSchema("No connection adapters were found for '%s'" % url)
InvalidSchema: No connection adapters were found for 'ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.9.tar.gz'

Storing debug log for failure in /home/ubuntu/.pip/pip.log
@lucmult
Copy link
Author

lucmult commented Feb 6, 2014

pip --version

pip 1.5.2 from /home/ubuntu/bex/venv/local/lib/python2.7/site-packages (python 2.7)

@lucmult
Copy link
Author

lucmult commented Feb 6, 2014

I tried the same file using the master HEAD and got the same issue.

@lucmult
Copy link
Author

lucmult commented Feb 6, 2014

It works with pip 1.4.1

@lucmult
Copy link
Author

lucmult commented Feb 6, 2014

Ok, using git bisect I found this commit introduced the issue:
ff2854a

I'm running the test like:

python pip/runner.py install ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.9.tar.gz

@sffjunkie
Copy link

The looks like it's the result of switching from using the urllib2 library (CacheFTPHandler) to the Requests library which does not provide an FTP Adapter. Until that is available you'll have this problem.

@piotr-dobrogost
Copy link

@lucmult You can edit your comments – no need to put each update on it's own :)

@dstufft
Copy link
Member

dstufft commented Feb 25, 2014

Hmm, yes this was a result of the switch to requests. However I'm not sure we should continue to support use of ftp urls either way. As far as I'm aware ftp servers to not generally support TLS and without that we lose the ability to securely fetch files from these servers.

@dstufft
Copy link
Member

dstufft commented Feb 25, 2014

Any thoughts @qwcode and @pfmoore ?

@pfmoore
Copy link
Member

pfmoore commented Feb 25, 2014

Personally, I have no need for ftp. The OP's use case is real, though - xmlsoft.org does only distribute libxml2-python over ftp. But that is a very old version - it's from 2004 as far as I can see.

So I don't have any strong objection to simply documenting that ftp support was discontinued with the move to requests. But if people come up with other genuine use cases, we should be prepared to reconsider (I have had ISPs in the past who only supported ftp hosting, and I can imagine having waned to host packages there)

@lucmult
Copy link
Author

lucmult commented Feb 25, 2014

I found an alternative HTTP link for this package:
http://xmlsoft.org/sources/python/libxml2-python-2.6.9.tar.gz

HTTP isn't secure either ;-)

@dstufft
Copy link
Member

dstufft commented Feb 25, 2014

Nope! It's not. But HTTPS is and pip is discouraging the use of HTTP instead of HTTPS :)

@lucmult
Copy link
Author

lucmult commented Feb 25, 2014

@dstufft many hosts out there don't support HTTPS. In fact, this libxml example doesn't support HTTPS.

I agree with @pfmoore suggestion to "fix" this issue by documenting it.

@qwcode qwcode added the docs label Feb 27, 2014
@dstufft dstufft added this to the 1.6 milestone Mar 28, 2014
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: docs Documentation related
Projects
None yet
Development

No branches or pull requests

6 participants