Check oauthlib installation when importing asynchronous subpackage
authorHarmon <Harmon758@gmail.com>
Sun, 16 May 2021 11:06:15 +0000 (06:06 -0500)
committerHarmon <Harmon758@gmail.com>
Sun, 16 May 2021 11:06:15 +0000 (06:06 -0500)
tweepy/asynchronous/__init__.py

index aac29bb9e4a6ad70c4fca2180708527b7e6239ec..72ff5c65d16a9f7e33432b81a6f3014f2473b738 100644 (file)
@@ -10,8 +10,11 @@ Asynchronous interfaces with the Twitter API
 
 try:
     import aiohttp
+    import oauthlib
 except ModuleNotFoundError:
     from tweepy.errors import TweepyException
-    raise TweepyException("tweepy.asynchronous requires aiohttp to be installed")
+    raise TweepyException(
+        "tweepy.asynchronous requires aiohttp and oauthlib to be installed"
+    )
 
 from tweepy.asynchronous.streaming import AsyncStream