AttributeError: aiohttp has no attribute BodyPartWriter
Created by: jchristgit
I wrote some tests on my fork.
What's being tested currently is owo.upload_files
, owo.shorten_urls
as well as their async variants, owo.async_owo.async_upload_files
and owo.async_owo.async_shorten_urls
.
All tests work as expected, but through the import of owo/aiohttp2.py
in owo/async_owo.py
, an AttributeError
occurs. Here's the traceback:
______________________________ test_async_upload _______________________________
def test_async_upload():
future = async_owo.async_upload_files(API_KEY, *UPLOAD_TEST_FILES)
> file_names = loop.run_until_complete(future)
tests/test_async_owo.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
return future.result()
owo/async_owo.py:17: in async_upload_files
from . import aiohttp2
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
from urllib.parse import quote
from aiohttp.multipart import TOKEN
from aiohttp.hdrs import CONTENT_DISPOSITION
import aiohttp
> class BodyPartWriter(aiohttp.BodyPartWriter):
E AttributeError: module 'aiohttp' has no attribute 'BodyPartWriter'
owo/aiohttp2.py:13: AttributeError
I'm running the tests on Python 3.6, here are the installed packages:
aiohttp==2.0.7, async-timeout==1.3.0, certifi==2017.7.27.1, chardet==3.0.4, idna==2.6, multidict==3.1.3, pluggy==0.5.2, py==1.4.34, requests==2.18.4, tox==2.8.1, urllib3==1.22, virtualenv==15.1.0, yarl==0.10.3