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

Unfriendly Error Msg #7

Open
diyiy opened this issue Dec 19, 2016 · 0 comments
Open

Unfriendly Error Msg #7

diyiy opened this issue Dec 19, 2016 · 0 comments

Comments

@diyiy
Copy link

diyiy commented Dec 19, 2016

print("Checking an archived edit")
print("---------------")
reverting, reverted, reverted_to = \
    mwreverts.db.check_archive(enwiki, 21995518)
print("reverting:", format_revert(reverting))
print("reverted:", format_revert(reverted))
print("reverted_to:", format_revert(reverted_to))

When a revision is not found in the archive table, it outputs the below error:

---------------
Checking an archived edit
---------------
Traceback (most recent call last):
  File "demo_db_check.py", line 51, in <module>
    mwreverts.db.check_archive(enwiki, 21995518)
  File "/mnt/nfs/labstore-secondary-tools-home/diyi/delete_check/python-mwreverts/mwreverts/db.py", line 256, in check_archive
    get_archived_namespace_title_and_timestamp(schema, rev_id)
  File "/mnt/nfs/labstore-secondary-tools-home/diyi/delete_check/python-mwreverts/mwreverts/db.py", line 199, in get_archived_namespace_title_and_timestamp
    return row[0], row[1], Timestamp(row[2])
TypeError: 'NoneType' object is not subscriptable

This error should be reported more friendly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant