micahflee / semiphemeral

Automatically delete your old tweets, except for the ones you want to keep
MIT License
884 stars 85 forks source link

Error on configure save and fetch #103

Closed ChawiBiker closed 1 year ago

ChawiBiker commented 2 years ago

I receive two errors. First when I save in the browser

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

This happens only when I have all 4 keys entered and my twitter name. Else it saves normally if for example one is missing.

Second error is when I perform semiphemeral fetch

semiphemeral 0.7 Traceback (most recent call last): File "/usr/local/bin/semiphemeral", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(args, **kwargs) File "/usr/local/lib/python3.9/site-packages/semiphemeral/init.py", line 61, in fetch t = Twitter(common) File "/usr/local/lib/python3.9/site-packages/semiphemeral/twitter.py", line 33, in init self.api = tweepy.API( TypeError: init() got an unexpected keyword argument 'wait_on_rate_limit_notify'

I managed to upgrade my dev account meaning I use Twitter API v1.1 Tweepy is running on version 3.10.0 I'm running this on OS X 11.6.4

Name: tweepy Version: 3.10.0 Summary: Twitter library for Python Home-page: https://www.tweepy.org/ Author: Joshua Roesslein Author-email: tweepy@googlegroups.com License: MIT Location: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages Requires: requests, requests-oauthlib, six Required-by:

Any idea what is going wrong and what I could do in order to fix this?

byteborg commented 2 years ago

Same here, RasPi on bullseye, Python 3.9.2/Pip 20.3.4, semiphemeral==0.7

byteborg commented 2 years ago

Ah, I've just seen #92 - old tweepy version being suspected. I got tweepy==4.8.0 which is current stable. So any ideas, how it could be fixed?

th3joker3000 commented 2 years ago

I've installed the latest tweepy version (3.9.0) but it doesn't work either. I also installed the version 3.7.0 but it still fails to work.

KopfKrieg commented 2 years ago

Had the same problem, but works for me if I install tweepy<4.0

deybhayden commented 2 years ago

As long as your account applies for Elevated Access (done from the project dashboard and is approved, this tool works as intended (using v1.1 APIs)

ChawiBiker commented 2 years ago

I managed to run it now with binding to tweeps 3.7.0 on install. Sadly despite v1.1 api I only get 3000 tweets :(

JohnVeness commented 2 years ago

@ChawiBiker If you clone the master branch you can use the "import" feature added in #23 to populate the database. That should get all your tweets.

ChawiBiker commented 2 years ago

@JohnVeness thank you. I will try to understand how this works :)

davegallant commented 2 years ago

Had the same problem, but works for me if I install tweepy<4.0

This fixed it for me. The tweepy version should probably be constrained in setup.py or the function call fixed for the new api.

pdelteil commented 2 years ago

Had the same problem, but works for me if I install tweepy<4.0

To save people some time, just run:

pip install tweepy==3.10.0

Then, run semipheral configure and then semipheral fetch

umrath commented 2 years ago

Had the same problem, but works for me if I install tweepy<4.0

To save people some time, just run:

pip install tweepy==3.10.0

Then, run semipheral configure and then semipheral fetch

sadly, even then it fails for me (macos). ok, configure works after getting elevated access.

Now I'm stuck with fetch failing ... (different topic)

byteborg commented 1 year ago

pip install -U tweepy==3.10.0 when another version was installed previously. You will need to have a pretty old developer account for it functioning without paying, though. v1 API access seems to be a $$$ feature now.

graciano commented 1 year ago

Hey @byteborg, what do you mean by this?

You will need to have a pretty old developer account for it functioning without paying, though. v1 API access seems to be a $$$ feature now.

It's a paid feature on twitter? So in the case of someone who just created the credentials there, either update the code to work with the new version or pay twitter. Am I interpreting this correctly?

byteborg commented 1 year ago

It's a paid feature on twitter? So in the case of someone who just created the credentials there, either update the code to work with the new version or pay twitter. Am I interpreting this correctly?

That's how I understood the Twitter API documentation at the time. YMMV, they are changing a lot these days...