nanos / FediFetcher

FediFetcher is a tool for Mastodon that automatically fetches missing replies and posts from other fediverse instances, and adds them to your own Mastodon instance.
https://blog.thms.uk/fedifetcher?utm_source=github
MIT License
293 stars 213 forks source link

from-lists causes TypeError #134

Closed paviro closed 4 days ago

paviro commented 4 days ago

It seems there is something broken when using lists. As soon as I add from-lists: 1 I get :

2024-06-28 13:38:00.516 CEST: Starting FediFetcher
2024-06-28 13:38:00.517 CEST: Getting robots.txt file from cache xxxx
2024-06-28 13:38:01.146 CEST: Job failed after 0:00:00.629743.
Traceback (most recent call last):
  File "/home/mastodon/FediFetcher/find_posts.py", line 1535, in <module>
    timeline_toots = get_list_timeline(arguments.server, list, token, arguments.max_list_length)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mastodon/FediFetcher/find_posts.py", line 1346, in get_list_timeline
    posts = get_paginated_mastodon(url, max, {
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mastodon/FediFetcher/find_posts.py", line 994, in get_paginated_mastodon
    if isinstance(response_json, list):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union

Any ideas?

Best, Paul

nanos commented 4 days ago

Have a look at the latest commits on the main branch. Does that fix it for you?

paviro commented 4 days ago

Oh wow that was fast! It does thank you!

nanos commented 4 days ago

thanks for confirming!