Page MenuHomePhabricator

Pywikibot gives a not-so-necessary warning: "entity-schema datatype is not supported yet"
Closed, ResolvedPublicBUG REPORT

Description

I'm running this code:

import pywikibot

site = pywikibot.Site("wikidata", "wikidata")
repo = site.data_repository()
item_id = "Q254" # Wolfgang Amadeus Mozart

item = pywikibot.ItemPage(repo, item_id)
if item.exists():
    print(f"item {item_id} exists")

item.get()

It produces these warnings at item.exists() and item.get():

WARNING: entity-schema datatype is not supported yet.

The reason may be that https://www.wikidata.org/wiki/Q254 has a statement with the property EntitySchema for this class. However, showing this warning at .exists() and .get() looks like an exaggeration, because these methods don't seem to do anything with the statement with this property.

Related Objects

Event Timeline

Amire80 updated the task description. (Show Details)

Change #1074403 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Show a warning message for a deleted or unknown claim type

https://gerrit.wikimedia.org/r/1074403

Xqt changed the task status from Open to In Progress.Sep 20 2024, 12:37 PM
Xqt claimed this task.
Xqt triaged this task as Low priority.
Xqt moved this task from Backlog to Needs Review on the Pywikibot board.
Xqt reopened this task as In Progress.

Change #1074403 merged by Xqt:

[pywikibot/core@master] [IMPR] Show a warning message for a deleted or unknown claim type

https://gerrit.wikimedia.org/r/1074403