Page MenuHomeMiraheze

default content model of wikibase missing (affects pywikibot usage)
Closed, ResolvedPublic

Description

So I was running a script that was supposed to create wikibase items for pages on the client wiki, on the Repository, but it seems via here and of course, ManageWiki, that our wikibase repo doesn't declare the right content model for the wikibase.
With https://gratisdata.miraheze.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces&formatversion=2 you'd find out that we don't have wikibase-item, and wikibase-property content model as the default CM for Item(main) and Property namespaces respectively.

Luckily, exactly what I'm talking about happened on Wikibase/Wikidata on Wikimedia and it was resolved, I am gonna link to the Upstream task (that was resolved), I believe we can solve this with their own solutions.

I believe this was the reason why @Universal_Omega wasn't able to *normally* import wikibase items and wikibase properties for gratisdata back then.

Upstream task;
https://phabricator.wikimedia.org/T288724
https://phabricator.wikimedia.org/T288820

This might be useful too;
https://phabricator.wikimedia.org/rEWBA71c66843ad3f20893cb805e141e94ae2794527c7
Useful gerrit link;
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/711714/

So below is the error I get when running the pywikibot script, hence why it affects pywikibot.

Traceback (most recent call last):
File "C:\Users\Joseph\pywikibot\curate.newpages.en.py", line 380, in <module>
  main()
File "C:\Users\Joseph\pywikibot\curate.newpages.en.py", line 367, in main
  newitem = pywikibot.ItemPage(repo)
File "C:\Users\Joseph\pywikibot\pywikibot\page\__init__.py", line 3901, in __init__
  ns = site.item_namespace
File "C:\Users\Joseph\pywikibot\pywikibot\site\_datasite.py", line 91, in item_namespace
  self._item_namespace = self.get_namespace_for_entity_type(
File "C:\Users\Joseph\pywikibot\pywikibot\site\_datasite.py", line 78, in get_namespace_for_entity_type
  raise EntityTypeUnknownError(
pywikibot.exceptions.EntityTypeUnknownError: DataSite("en", "gratisdata") does not support entity type "item"

Event Timeline

Excelsis triaged this task as Normal priority.Dec 4 2021, 21:34
Excelsis created this task.
Unknown Object (User) added a comment.Dec 5 2021, 02:53

https://github.com/miraheze/ManageWiki/pull/318 will allow it to be changeable through ManageWiki.

Unknown Object (User) moved this task from Backlog to Short Term on the MediaWiki (SRE) board.Dec 5 2021, 02:54
Unknown Object (User) moved this task from Unsorted to Short Term on the Universal Omega board.
Unknown Object (User) edited projects, added ManageWiki; removed Configuration.
Unknown Object (User) moved this task from Backlog to Features on the ManageWiki board.Dec 5 2021, 02:54
Unknown Object (User) claimed this task.Dec 6 2021, 08:00
Unknown Object (User) closed this task as Resolved.Dec 7 2021, 22:38

It should now be possible to set to this content model via Special:ManageWiki/namespaces.