Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List exports might not include all accounts in the list #1

Closed
seanthegeek opened this issue Dec 22, 2022 · 4 comments
Closed

List exports might not include all accounts in the list #1

seanthegeek opened this issue Dec 22, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@seanthegeek
Copy link
Owner

seanthegeek commented Dec 22, 2022

I used listmanager.py to export the list of accounts followed by MeidasTouch@mstdn.social (meidasTouch@mstdn.social.csv). When I used the same script to import that list into my US politics list, API errors were returned for 12 of the 50 accounts.

WARNING: Unable to add washingtonpost@mstdn.social to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add juddlegum@journa.host to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add DevinCow@mastodon.online to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add mehdihasan@journa.host to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add meidaslisa@mastodon.social to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add CREW@mstdn.social to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add pkrugman@mastodon.online to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add rexchapman@sfba.social to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add MuellerSheWrote@mastodon.online to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add KlasfeldReports@journa.host to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add JoyceVance@mstdn.social to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')
WARNING: Unable to add katiephang@mstdn.social to US politics: ('Mastodon API returned error', 422, 'Unprocessable Entity', 'Validation failed: Account has already been taken')

Further investigation revealed that these accounts appeared in the list web UI after a previous run, but for some reason are not listed in the list_accounts API call, so the script thinks those accounts need to be added to the list. This results in the API errors, because the accounts ate already in the list.

I will open an issue on the Mastodon project, and use this issue for reference.

@seanthegeek seanthegeek added the bug Something isn't working label Dec 22, 2022
@seanthegeek seanthegeek pinned this issue Dec 22, 2022
seanthegeek added a commit that referenced this issue Dec 22, 2022
Ignore errors indicating that an account is already in a list
@seanthegeek seanthegeek changed the title API errors when adding a small subset of accounts to a list List exports might not include all accounts in the list Dec 22, 2022
@seanthegeek
Copy link
Owner Author

seanthegeek commented Dec 23, 2022

It turns out that information from this API call is eventually accurate, it's just delayed. This seems to be a caching problem somewhere. Investigating further with the infosec.exchange instance administrator.

@seanthegeek
Copy link
Owner Author

The issue occurs immediately after adding an account to a list, even if the list accounts API call hasn't been made recently, so it's not an issue of the API results being cached, but of a long delay in the accuracy of the data provided by the API call.

@seanthegeek
Copy link
Owner Author

Mastodon bug reported here mastodon/mastodon#22828

seanthegeek added a commit that referenced this issue Jan 11, 2023
- Fix bug where only 40 accounts were ever returned in a list (close issue #1)
- Add `--debug` CLI option
@seanthegeek
Copy link
Owner Author

Disregard. I forgot to paginate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant