Skip to content

OpenRefine upload to Wikidata stalls on deleted items #5385

Closed

Description

@VojtechDostal

When you have a list of items and reconcile them "as identifiers", it often happens that some of the items had already been deleted from Wikidata. But they still reconcile.

However, when the Wikidata upload gets to this item, it gives the following error:
Exception in thread "Thread-12" java.lang.NullPointerException
And then it basically just stops the upload...

Steps to reproduce:
Reconcile Q56640589 as Wikidata identifier
try to import something

Expected behavior:
Skip the deleted item. Or do not reconcile it at all.

This is OpenRefine 3.5.2.
Haven't tried it yet in a newer version.

Activity

  1. added
    Type: BugIssues related to software defects or unexpected behavior, which require resolution.
    Status: Pending ReviewIndicates that the issue or pull request is awaiting review by project maintainers or collaborators
    on Oct 25, 2022
  2. added
    wikibaseRelated to wikidata/wikibase integration
    on Nov 4, 2022
  3. mshd commented on Feb 10, 2023

    @mshd

    Can you try again on the lastest dev version, I think this has been fixed (at least for merged items)

  4. VojtechDostal commented on Feb 10, 2023

    @VojtechDostal
    Author

    @mshd So, I downloaded version 3.7-beta5 (2023-01-26)
    and I pasted the following row from clipboard: Q56640589  Q6581097
    I was able to reconcile both columns with Wikidata.

    I assembled the following Wikidata schema:

    Column1: Property "Sex or gender" : Column2.

    And after starting the import, I get the following errors in the console:

    09:42:10.206 [..mWikibaseEditsOperation] Performing edits (14ms) 09:42:10.207 [..ting.EditBatchProcessor] Requesting documents (1ms) 09:42:10.508 [..ting.EditBatchProcessor] Retrying in 10000 ms (301ms) Exception in thread "Thread-3" java.lang.NullPointerException: Cannot invoke "org.wikidata.wdtk.datamodel.interfaces.StatementDocument.getEntityId()" because "currentDocument" is null at org.openrefine.wikibase.updates.LabeledStatementEntityEdit.toStatementUpdate(LabeledStatementEntityEdit.java:187) at org.openrefine.wikibase.updates.ItemEdit.toEntityUpdate(ItemEdit.java:159) at org.openrefine.wikibase.editing.EditBatchProcessor.performEdit(EditBatchProcessor.java:176) at org.openrefine.wikibase.operations.PerformWikibaseEditsOperation$PerformEditsProcess.run(PerformWikibaseEditsOperation.java:262) at java.base/java.lang.Thread.run(Thread.java:1589)

    The import job stalls at "0% complete" unless I manually cancel it.

  5. LibrErli commented on Mar 23, 2023

    @LibrErli

    i ran into the same problem with Version 3.7.0 on Wikidata-QID: Q79691922
    The upload process stops at the deleted but reconciled record in the project, unless manual cancelling of the upload process.
    The OpenRefine Shell shows the following output:

    Exception in thread "Thread-2" java.lang.NullPointerException
            at org.openrefine.wikibase.updates.LabeledStatementEntityEdit.toStatementUpdate(LabeledStatementEntityEdit.java:187)
            at org.openrefine.wikibase.updates.ItemEdit.toEntityUpdate(ItemEdit.java:159)
            at org.openrefine.wikibase.editing.EditBatchProcessor.performEdit(EditBatchProcessor.java:176)
            at org.openrefine.wikibase.operations.PerformWikibaseEditsOperation$PerformEditsProcess.run(PerformWikibaseEditsOperation.java:262)
            at java.base/java.lang.Thread.run(Unknown Source)
    

    Version: 3.7.0
    OS: Windows 10

  6. tamunro commented on Mar 30, 2023

    @tamunro

    I had the same problem with Wikidata-QID Q17068417, using v.3.7.1 on MacOS. No error message appeared.

  7. tillgrallert commented on Jun 1, 2023

    @tillgrallert

    Same here with Q98847703, using v.3.7.2 on the latest macOS. No error message.

  8. removed
    Status: Pending ReviewIndicates that the issue or pull request is awaiting review by project maintainers or collaborators
    on Jun 4, 2023
  9. self-assigned this
    on Jun 4, 2023
  10. added a commit that references this issue on Jun 4, 2023
    9b922a9
  11. added a commit that references this issue on Jun 15, 2023
    27a66a5
  12. wetneb commented on Jun 15, 2023

    @wetneb
    Member

    Thank you all for reporting this annoying issue.
    For now I've made a change to just skip those edits, which should be released in 3.8. In the meantime you can use our snapshot releases.

    Better error reporting is coming in 4.0.

  13. added a commit that references this issue on Jun 26, 2023
    7564b73
  14. added this to the 3.8 milestone on Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: BugIssues related to software defects or unexpected behavior, which require resolution.wikibaseRelated to wikidata/wikibase integration

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions