DaveNugent / TwitterMostUsedWord

This app creates a wordmap of a twitter users most tweeted words
1 stars 0 forks source link

Need Help #1

Open alireza-f opened 4 years ago

alireza-f commented 4 years ago

It shows this error, can you help me?

Getting data for jack Traceback (most recent call last): File "C:\Users\jack\Documents\GitHub\TwitterMostUsedWord\TwitterMostUsedWord\TwitterMostUsedWord.py", line 24, in item = api.get_user(userName) File "C:\Users\jack\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tweepy\binder.py", line 250, in _call return method.execute() File "C:\Users\jack\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tweepy\binder.py", line 233, in execute raise TweepError(error_msg, resp, api_code=api_error_code) tweepy.error.TweepError: [{'code': 89, 'message': 'Invalid or expired token.'}] [Finished in 6.03s]

DaveNugent commented 4 years ago

Sorry I probably should have written a README for this. Did you replace the xs on lines 10 - 13 of TwitterMostUsedWord.py with your own credentials?

CONSUMER_KEY = "xxxxxxxxxxxx" CONSUMER_SECRET = "xxxxxxxxxxxx" ACCESS_TOKEN = "xxxxxxxxxxxx-xxxxxxxxxxxx" ACCESS_TOKEN_SECRET = "xxxxxxxxxxxx"

alireza-f commented 4 years ago

Yep, I didn't know that and entered them but there is a new problem that i can't understant. sorry for questioning frequently, i am new in python.

Traceback (most recent call last): File "C:\Users\jack\Documents\GitHub\TwitterMostUsedWord\TwitterMostUsedWord\TwitterMostUsedWord.py", line 41, in maskArray = npy.array(Image.open("cloud.png")) File "C:\Users\alire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\PIL\Image.py", line 2809, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'cloud.png'