Closed realkinetix closed 2 years ago
Hi @realkinetix ! It seems like an oversight on my part, if the Twitter profile does not have a profile banner or image then you'd run into this issue. I have implemented a hotfix that you can try by installing this version:
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pleroma-bot==1.0.2rc1
Let me know if that solves it for you, if so, the fix will be included on the next stable version.
Huh, that's interesting - now, I honestly don't know what's occurred with the twitter accounts it was tripping up on, but we didn't have that issue months ago when allowing profiles to be checked.
That said, I've just tried 1.0.2rc1 and no problems at all, seems to have worked!
Excellent! I'll run some more internal testing and after that I'll include the hotfix in v1.0.2 proper whenever it gets released on the stable branch.
Yeah, it looks like a regression introduced in 1.0.0, really sorry about that! 😅
Cool, sounds like that explains it! Have a good one, and no need to apologise in the least!
Hey @realkinetix ! The latest version v1.0.2 should have fixed this issue, hopefully. Feel free to give it a spin and report back if you happen to run into any other bugs. Have a nice day!
Hi there,
On 1.0.0 and 1.0.1, I've recently seen that trying to get a profile update from some accounts seems to be resulting in a KeyError. I'm curious what could be triggering it.
For example:
ℹ 2022-02-14 10:29:19,739 - pleroma_bot - INFO - ====================================== ℹ 2022-02-14 10:29:19,739 - pleroma_bot - INFO - Processing user: kamithefishbot ℹ 2022-02-14 10:29:21,733 - pleroma_bot - INFO - Current pinned: None ℹ 2022-02-14 10:29:21,733 - pleroma_bot - INFO - Previous pinned: None ✖ 2022-02-14 10:29:21,893 - pleroma_bot - ERROR - Exception occurred (cli.py:502) Traceback (most recent call last): File "/home/pleromabot/myvenv/lib/python3.9/site-packages/pleroma_bot/cli.py", line 498, in main user.update_pleroma() File "/home/pleromabot/myvenv/lib/python3.9/site-packages/pleroma_bot/_pleroma.py", line 189, in update_pleroma if self.profile_banner_url[t_user]: KeyError: 'kamithefish'
"kamithefish" is the twitter account.
(myvenv) pleromabot@ded1 ~/myvenv $ python -V Python 3.9.9
(myvenv) pleromabot@ded1 ~/myvenv $ pip list Package Version
certifi 2021.5.30 charset-normalizer 2.0.3 idna 3.2 oauthlib 3.1.1 pip 22.0.3 pleroma-bot 1.0.1 PyYAML 5.4.1 requests 2.26.0 requests-oauthlib 1.3.0 setuptools 56.0.0 urllib3 1.26.6
If I remove the problematic entries from the config, there's a bunch of others that are updating without issue.
The same issue isn't occurring on runs that have --noProfile