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

Unclear support for loading FTP resources #107

Open
Chealer opened this issue Apr 24, 2020 · 2 comments
Open

Unclear support for loading FTP resources #107

Chealer opened this issue Apr 24, 2020 · 2 comments

Comments

@Chealer
Copy link

Chealer commented Apr 24, 2020

Express Loader uses the "Requests: HTTP for Humans" library, which - unsurprisingly - only supports HTTP, as it is based on urllib3, which - despite its name - does not support FTP like urllib2 did. As a result, Express Loader cannot upload FTP resources to DataStore.

I'm filing this:

  1. so that the code can be cleaned up. An error message for unsupported schemes ("Only http, https, and ftp resources may be fetched.") suggests that FTP resources are supported. This seems to come from an artifact in a merge from DataPusher via commit 9316a07.
  2. so that the actual error message displayed is improved. With our CKAN 2.8.4, the actual message we're seeing is:
    No connection adapters were found for 'ftp://transfert.mern.gouv.qc.ca/[...]csv' status=None url=ftp://transfert.mern.gouv.qc.ca/[...]csv response=None
    This is not clear, but also not quite cryptic, and an experienced administrator (or at least myself) is likely to infer that installing the appropriate "connection adapter" would suffice to support FTP. But unfortunately, that doesn't seem to be possible. This message comes straight from python-requests's sessions.py, and the only adapters requests defines are HTTP adapters. Either:
    1. python-requests should change its message to simply say that the scheme is unsupported.
    2. or xloader should simply and clearly say that FTP is unsupported.

Note that Express Loader's alternative DataPusher does not support FTP since version 0.0.13.

@davidread
Copy link
Contributor

davidread commented Apr 24, 2020 via email

@Chealer Chealer changed the title Does not support resource with FTP URL-s Unclear support for loading FTP resources Apr 24, 2020
@Chealer
Copy link
Author

Chealer commented Apr 24, 2020

Thank you for the quick reply David,
I apologize for the unclear request; despite the initial title, I did not fully mean this as a request to reintroduce support for FTP. I think clarifying that it is not currently supported would already be great.

That being said, we do use FTP resources and expect this loss to be problematic. I will discuss this issue with my team next week and we'll try to choose our course of action, which might be to modify xloader to support FTP. If so, I will share the results.

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