ammm
ammm

Reputation: 11

tweepy.binder module not found

After successly installing requirements there a module that isn't found, I think it's a problem with the bind9 module because there isn't a module named tweepy.binder. buts the result are same.

logs:

Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.1 Pillow-9.2.0 PyYAML-6.0 Werkzeug-2.2.2 certifi-2022.9.14 charset-normalizer-2.1.1 click-8.1.3 flask-2.2.2 httplib2-0.20.4 idna-3.4 importlib-metadata-4.12.0 itsdangerous-2.1.2 oauth2-1.9.0.post1 oauthlib-3.2.1 pyngrok-5.1.0 pyparsing-3.0.9 requests-2.28.1 requests-oauthlib-1.3.1 tweepy-4.10.1 urllib3-1.26.12 waitress-2.1.2 zipp-3.8.1

(venv) bot@lnxbot-1:~/botmaster$ python3 app.py
Traceback (most recent call last):
 File "/home/bot/botmaster/app.py", line 4, in from twitter_autobase import Autobase
 File "/home/bot/botmaster/twitter_autobase/init.py", line 11, in from .main import Autobase
 File "/home/bot/botmaster/twitter_autobase/main.py", line 9, in from .twitter import Twitter
 File "/home/bot/botmaster/twitter_autobase/twitter.py", line 13, in from tweepy.binder import bind_api
ModuleNotFoundError: No module named 'tweepy.binder' 

(venv) bot@lnxbot-1:~/botmaster$ sudo apt install bind9
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
bind9 is already the newest version (1:9.16.27-1~deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. 

so what is wrong? thanks!

Upvotes: 1

Views: 164

Answers (1)

joanis
joanis

Reputation: 12270

Your app.py code is importing from tweepy.binder, but that module was removed with version 4.0.0 of tweepy.

See the changelog for version 4.0.0:

Replace bind_api and APIMethod with API.request

Your best short-term option is to install version 3.10.0 of tweepy, the last one that provided tweepy.binder.bind_api like your app expects. Ideally change your requirements.txt file to specify that version, or else install it manually:

python3 -m pip install tweepy==3.10.0

Your best long-term option is to adapt the code to use the latest version of the tweepy library.

Upvotes: 1

Related Questions