LeMyst / LeMyst/WikibaseIntegrator
WikibaseIntegrator cannot write to empty MediaInfo files
@LeMyst is already working on this.
Since Feb 11, 2025.
- Dominant language
- Python
- Stars
- 92
- Forks
- 22
- Avg merge
- 2d 34m
- Merged PRs (30d)
- 10
Description
EDIT: Previous title was Some mediainfo IDs are not returning results --> The MW API returned that the entity was missing., changed to reflect updates.
Hi!
I continue working with mediainfo, and now I am running into this issue:
Code:
from wikibaseintegrator import wbi_login, WikibaseIntegrator, wbi_enums
from wikibaseintegrator.wbi_config import config as wbi_config
wbi_config['MEDIAWIKI_API_URL'] = 'https://commons.wikimedia.org/w/api.php'
wbi_config['SPARQL_ENDPOINT_URL'] = 'https://query.wikidata.org/sparql'
wbi_config['WIKIBASE_URL'] = 'https://commons.wikimedia.org'
wbi_config['USER_AGENT'] = 'TiagoLubiana (https://meta.wikimedia.org/wiki/User:TiagoLubiana)'
wbi = WikibaseIntegrator()
mediainfo_id = 'M44422187'
media = wbi.mediainfo.get(entity_id=mediainfo_id)
The issue only happens for some MediaInfo ids.
E.g. M91125720 works fine, but M44422187 does not.
The website does not return the .ttl for these entries too, e.g.
https://commons.wikimedia.org/wiki/Special:EntityData/M44422187.ttl
leads to
but the entry resolves just fine:
https://commons.wikimedia.org/entity/M44422187
I realize this is not a WikibaseIntegrator issue, and I'll try and report it on Phabricator. Leaving it for information.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.