Lynnesbian / Lynnesbian/OCRbot
OCRbot broken after Mastodon 3.4.0 upgrade
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 71
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
I had an instance of OCR bot running and then upgraded my Mastodon instance from 3.3.0 to 3.4.0. OCRbot immediately stopped working. The Mastodon instance works fine, and other bots that do things like post RSS feeds are working fine. Here is the error message I get:
$ /home/ocrbot/ocrbot/OCRbot/service.py
Logging in...
Using Tesseract (sh)
Available languages: eng
Starting OCRbot.
Traceback (most recent call last):
File "/home/ocrbot/ocrbot/OCRbot/service.py", line 314, in
client.stream_user(rl) #go!
File "/home/ocrbot/.local/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/ocrbot/.local/lib/python3.8/site-packages/mastodon/Mastodon.py", line 102, in wrapper
return function(self, *args, **kwargs)
File "/home/ocrbot/.local/lib/python3.8/site-packages/mastodon/Mastodon.py", line 3110, in stream_user
return self.__stream('/api/v1/streaming/user', listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec)
File "/home/ocrbot/.local/lib/python3.8/site-packages/mastodon/Mastodon.py", line 3626, in __stream
connection = connect_func()
File "/home/ocrbot/.local/lib/python3.8/site-packages/mastodon/Mastodon.py", line 3553, in connect_func
raise MastodonNetworkError("Could not connect to streaming server: %s" % connection.reason)
mastodon.Mastodon.MastodonNetworkError: Could not connect to streaming server: Internal Server Error
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at OCRbot/service.py line 314, where client.stream_user(rl) invokes the Mastodon streaming connection. Reproduce the failure against Mastodon 3.4.0 and inspect the mastodon Python client's stream_user implementation and endpoint handling. Done means OCRbot starts streaming user events without the reported MastodonNetworkError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100