Skip to content

[BUG] Empty result error from wikidata query #2226

@SimonYansenZhao

Description

@SimonYansenZhao

Description

The error is from running the tests in tests/data_validation/examples/test_wikidata.py::test_wikidata_runs and tests/data_validation/examples/test_wikidata.py::test_wikidata_values which run the notebook examples/01_prepare_data/wikidata_knowledge_graph.ipynb. When results_list is empty, we will get the error.

Screenshot 2025-04-26 at 09 50 02

And the same issue occurs in the following code as well when result is empty.

Screenshot 2025-04-26 at 09 59 29

In which platform does it happen?

How do we replicate the issue?

Create a GitHub Codespace, and run the notebook examples/01_prepare_data/wikidata_knowledge_graph.ipynb multiple times until results_list is empty.

Image

Or run it locally by the following steps:

  1. Setup

    cd recommenders
    conda create -n reco python=3.11
    conda activate reco
    pip install .[dev]
    
  2. Run the examples/01_prepare_data/wikidata_knowledge_graph.ipynb in VS Code multiple times until results_list is empty.

Expected behavior (i.e. solution)

results_list and result in the notebook examples/01_prepare_data/wikidata_knowledge_graph.ipynb should not be empty.

Willingness to contribute

  • Yes, I can contribute for this issue independently.
  • Yes, I can contribute for this issue with guidance from Recommenders community.
  • No, I cannot contribute at this time.

Other Comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions