Lynnesbian / Lynnesbian/OCRbot

OCRbot broken after Mastodon 3.4.0 upgrade

Open
#35 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.