You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tests.core.test_utils.FileDownloaderTestCase.test_downloads_file generates this:
======================================================================
ERROR: test_downloads_file (tests.core.test_utils.FileDownloaderTestCase)
Streams a jpg, saves it to /tmp/, returns the path, calls _make_filename_for_download().
----------------------------------------------------------------------
Traceback (most recent call last):
File "<string>", line 3, in wrapper
File "/Users/phil/.pyenv/versions/3.5.1/lib/python3.5/unittest/mock.py", line 1157, in patched
return func(*args, **keywargs)
File "/Users/phil/Projects/personal/django-ditto/tests/core/test_utils.py", line 131, in test_downloads_file
filepath = self.do_download()
File "/Users/phil/Projects/personal/django-ditto/tests/core/test_utils.py", line 123, in do_download
return filedownloader.download(self.url, ['image/jpeg'])
File "/Users/phil/Projects/personal/django-ditto/ditto/core/utils/downloader.py", line 48, in download
shutil.copyfileobj(r.raw, f)
File "/Users/phil/Projects/personal/django-ditto/.tox/py35-django110/lib/python3.5/shutil.py", line 73, in copyfileobj
buf = fsrc.read(length)
File "/Users/phil/Projects/personal/django-ditto/.tox/py35-django110/lib/python3.5/site-packages/requests/packages/urllib3/response.py", line 380, in read
data = self._fp.read(amt)
ValueError: I/O operation on closed file.
This happened when requests updated from v2.11.1 to v2.12.0.
No idea quite what's causing that and have spent too long trying to fix it.
The
tests.core.test_utils.FileDownloaderTestCase.test_downloads_file
generates this:This happened when
requests
updated from v2.11.1 to v2.12.0.No idea quite what's causing that and have spent too long trying to fix it.
http://stackoverflow.com/a/37283060/250962
The text was updated successfully, but these errors were encountered: