import requests
import requests_ftp
requests_ftp.monkeypatch_session()
s = requests.Session()
resp = s.list('ftp://host/', auth=('user', 'password'))
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 25, in list
return self.request('LIST', url, kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 182, in send
resp = self.func_table[request.method](path, request)
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 245, in list
response = build_text_response(request, data, code)
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 97, in build_text_response
return build_response(request, data, code, 'ascii')
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 116, in build_response
response.status_code = int(code.split()[0])
ValueError: invalid literal for int() with base 10: '226-Options:'
import requests import requests_ftp requests_ftp.monkeypatch_session() s = requests.Session() resp = s.list('ftp://host/', auth=('user', 'password')) Traceback (most recent call last): File "", line 1, in
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 25, in list
return self.request('LIST', url, kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 182, in send
resp = self.func_table[request.method](path, request)
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 245, in list
response = build_text_response(request, data, code)
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 97, in build_text_response
return build_response(request, data, code, 'ascii')
File "/usr/lib/python3.6/site-packages/requests_ftp/ftp.py", line 116, in build_response
response.status_code = int(code.split()[0])
ValueError: invalid literal for int() with base 10: '226-Options:'