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

ERROR: Exception occurred for user #119

Closed
CDN18 opened this issue Jan 28, 2023 · 4 comments
Closed

ERROR: Exception occurred for user #119

CDN18 opened this issue Jan 28, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@CDN18
Copy link

CDN18 commented Jan 28, 2023

pleroma-bot config (personal information redacted)

pleroma_base_url: https://mastodon.instance
users:
- twitter_username: username
  pleroma_username: 1********************0
  pleroma_token: d****************************
  rss: https://my.nitter.instance/username/with_replies/rss

Error message

2023-01-28 16:58:17,660 pleroma_bot ERROR: Exception occurred for user, skipping...
Traceback (most recent call last):
  File "/usr/local/python/3.10.4/lib/python3.10/site-packages/pleroma_bot/cli.py", line 556, in main
    user = User(user_item, config, base_path, posts_ids)
  File "/usr/local/python/3.10.4/lib/python3.10/site-packages/pleroma_bot/cli.py", line 289, in __init__
    self.mastodon_enforce_limits()
  File "/usr/local/python/3.10.4/lib/python3.10/site-packages/pleroma_bot/_utils.py", line 547, in mastodon_enforce_limits
    if len(self.display_name[t_user]) > 30:
KeyError: 'username'

The twitter username is 13 characters long.

@robertoszek
Copy link
Owner

robertoszek commented Jan 28, 2023

Hi!
Which version are you on, v1.2.0?
I think there's a bug on the Mastodon limits logic when using RSS feeds.

If it's what I'm thinking it should be resolved on the release candidate version 1.2.1rc18, which you can install like so:

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pleroma-bot==1.2.1rc18

If that's the issue, the fix should be rolled into the next stable release too.

@robertoszek robertoszek added the bug Something isn't working label Jan 28, 2023
@CDN18
Copy link
Author

CDN18 commented Jan 29, 2023

Yes I'm on v1.2.0, sorry I forgot to mention this before.
After upgrading to v1.2.1rc18, the above issue was resolved but the bot throws a new error while posting tweets:

Traceback (most recent call last):
  File "/usr/local/python/3.10.4/lib/python3.10/site-packages/pleroma_bot/cli.py", line 699, in main
    cw=tweet["cw"]
KeyError: 'cw'

@robertoszek
Copy link
Owner

Oh, interesting.

Does 1.2.1rc19 solve it?:

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pleroma-bot==1.2.1rc19

@CDN18
Copy link
Author

CDN18 commented Jan 29, 2023

Yes, in 1.2.1rc19 the bot can repost the tweets successfully, many thanks❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants