'What's the meaning of this error messaging trying to use Twitter API Bearer Token with Tweepy on Google Colab

I'm trying to access the Twitter API via Tweepy on Google Colab, and am following the Tweepy documentation on the Twitter APIv2. https://docs.tweepy.org/en/latest/authentication.html#twitter-api-v2

So this is what I'm running:

import tweepy

client = tweepy.Client("my_bearer_token")

With my actual Bearer Token inserted.

However, I'm receiving the following error message:

AttributeError                            Traceback (most recent call last)
<ipython-input-3-2d6a240a3613> in <module>()
      1 import tweepy
      2 
----> 3 client = tweepy.Client("my_bearer_token")

AttributeError: module 'tweepy' has no attribute 'Client'

I've read this post on the issue, Tweepy 3.10.0, AttributeError: module 'tweepy' has no attribute 'Client' but I'm still not clear why the Tweepy documented code wouldn't work.

If Tweepy has no attribute 'Client', is there an update for that attribute?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source