-
Notifications
You must be signed in to change notification settings - Fork 50
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
Comments
Wonderful work sleuthing! I wasn’t aware of the ftp support or lack of it.
‘requests’ is loads better than urllib2 - it would make no sense to support
go back, just for the sake of ftp.
I’m also not terribly excited about adding ftp support. Ftp is not very
good these days for open access - it places a burden on clients. I guess
there are a few legacy downloads still using ftp, that are too hard to
change, though. So I’d be happy if you proposed a PR to add ftp support, as
long as it doesn’t make the code much more complex. I wonder if you could
catch the exception from the requests call to see if it looks likely that
ftp might work and then try an ftp library instead to download the file. Do
you think that would work?
|
Thank you for the quick reply David, 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. |
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:
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:
Note that Express Loader's alternative DataPusher does not support FTP since version 0.0.13.
The text was updated successfully, but these errors were encountered: