Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I had a problem trying it out #134

Open
lajiduojiaji opened this issue Dec 13, 2023 · 5 comments
Open

I had a problem trying it out #134

lajiduojiaji opened this issue Dec 13, 2023 · 5 comments

Comments

@lajiduojiaji
Copy link

lajiduojiaji commented Dec 13, 2023

from tweety import Twitter

app = Twitter("session")
app.sign_in("", "")
all_tweets = app.get_tweets("elonmusk")
for tweet in all_tweets:
print(tweet)

Traceback (most recent call last):
File "F:\Downloads\tweety-main\tweety-main\test.py", line 3, in
app = Twitter("session")
^^^^^^^^^^^^^^^^^^
File "F:\Downloads\tweety-main\tweety-main\venv\Lib\site-packages\tweety\bot.py", line 34, in init
self.request = self.http = Request(max_retries=10, proxy=self._proxy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Downloads\tweety-main\tweety-main\venv\Lib\site-packages\tweety\http.py", line 21, in init
self.__guest_token = self._get_guest_token(max_retries)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Downloads\tweety-main\tweety-main\venv\Lib\site-packages\tweety\http.py", line 93, in get_guest_token
raise GuestTokenNotFound(None, None, last_response,
tweety.exceptions
.GuestTokenNotFound: Guest Token couldn't be found after 10 retires.

EDIT: Removed sensitive info.

@mahrtayyab
Copy link
Owner

Are you using it on aws or google cloud?

@lajiduojiaji
Copy link
Author

No,I just ran your code on pycharm.

@mahrtayyab
Copy link
Owner

Please make sure you are on latest source

@WeridFire
Copy link

I get the same problem from pythonanywhere.com but not for my local machine maybe has something to do with proxies?

@mahrtayyab
Copy link
Owner

Added fallback method to get guest token , update to latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants