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

Error when running check & repair #520

Open
DavidMStraub opened this issue Jul 10, 2024 · 2 comments
Open

Error when running check & repair #520

DavidMStraub opened this issue Jul 10, 2024 · 2 comments

Comments

@DavidMStraub
Copy link
Member

[2024-07-10 18:23:05,634: ERROR/ForkPoolWorker-7] Task gramps_webapi.api.tasks.check_repair_database[e1958ffb-55cc-4533-afd7-397f53ba4e76] raised unexpected: AttributeError("'Tag' object has no attribute 'gramps_id'")
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/celery/app/trace.py", line 453, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/gramps_webapi/util/celery.py", line 20, in __call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/gramps_webapi/api/tasks.py", line 338, in check_repair_database
    return check_database(db_handle, progress_cb=progress_callback_count(self))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/gramps_webapi/api/check.py", line 123, in check_database
    checker.check_backlinks()
  File "/usr/local/lib/python3.11/dist-packages/gramps/plugins/tool/check.py", line 1416, in check_backlinks
    {"gid": pri_obj.gramps_id, "cls": key[0], "cls2": item[0]},
            ^^^^^^^^^^^^^^^^^
AttributeError: 'Tag' object has no attribute 'gramps_id'
@DavidMStraub DavidMStraub added the bug Something isn't working label Jul 10, 2024
@Nick-Hall
Copy link
Member

A Tag is a TableObject rather than a PrimaryObject so it doesn't have a gramps_id.

@DavidMStraub
Copy link
Member Author

Right, but I believe there error is in Gramps core:
https://github.com/gramps-project/gramps/blob/master/gramps/plugins/tool/check.py#L1416

It assumes a referenced object is a primary object, but it can be a tag as well.

@DavidMStraub DavidMStraub removed the bug Something isn't working label Nov 28, 2024
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

2 participants