kensanata / mastodon-archive

Archive your statuses, favorites and media using the Mastodon API (i.e. login required)
https://alexschroeder.ch/software/Mastodon_Archive
GNU General Public License v3.0
362 stars 33 forks source link

Argument of NoneType is not iterable #57

Closed finnoleary closed 1 year ago

finnoleary commented 4 years ago

Installing via pip3 install mastodon, and invoking like:

~/.local/bin/mastodon-archive replies --pace "$1" || exit 1

Returns the error

Get user info
Traceback (most recent call last):
  File "/home/foo/.local/bin/mastodon-archive", line 11, in <module>
    sys.exit(main())
  File "/home/foo/.local/lib/python3.6/site-packages/mastodon_archive/__init__.py", line 293, in main
    args.command(args)
  File "/home/foo/.local/lib/python3.6/site-packages/mastodon_archive/replies.py", line 58, in replies
    if collection not in data:
TypeError: argument of type 'NoneType' is not iterable

Error is also present when installing via python3.8 -m pip install mastodon_archive, and invoking via python3.8 ~/.local/bin/mastodon-archive replies --pace "$1" || exit 1

This error is present both on Alpine edge and Ubuntu 18.04.4.

kensanata commented 4 years ago

Hm. I think the problem is that you don't have a regular archive with your own toots and so the tool cannot determine the toots you're replying to because it doesn't know about your replies. Try archive subcommand, first? 0eae94c makes an existing archive now mandatory.

kensanata commented 4 years ago

@finnoleary Is this still a problem, or is this still something we need to fix in some way?