SuLab / WikidataIntegrator

A Wikidata Python module integrating the MediaWiki API and the Wikidata SPARQL endpoint
MIT License
242 stars 46 forks source link

PMID from EuropePMC no working well (or at least I am getting weird behaviour) #203

Open lubianat opened 1 month ago

lubianat commented 1 month ago

I've got an error here when running the Cellosaurus bot:

Code:

  print(pmid)
  wdi_publication_helper = wdi_helpers.PublicationHelper(
      ext_id=pmid, id_type="pmid", source="europepmc"
  )
    wdi_result = wdi_publication_helper.get_or_create(login_instance)

Then I get the error:

33892290
Error while writing to Wikidata
{'error': {'code': 'modification-failed', 'info': 'Must be at least one character long', 'messages': [{'name': 'wikibase-validator-too-short', 'parameters': ['1', ''], 'html': {'*': 'Must be at least one character long'}}], '*': 'See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes.'}, 'servedby': 'mw-api-ext.eqiad.main-685fcc5bdb-lbmzh'}
('', ['unknown publication type, assuming publication'], WDApiError({'error': {'code': 'modification-failed', 'info': 'Must be at least one character long', 'messages': [{'name': 'wikibase-validator-too-short', 'parameters': ['1', ''], 'html': {'*': 'Must be at least one character long'}}], '*': 'See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes.'}, 'servedby': 'mw-api-ext.eqiad.main-685fcc5bdb-lbmzh'}))

Do you know what could be causing that? Thanks!

lubianat commented 1 month ago

oh apparently it is deprecated, I am sorry!

https://github.com/SuLab/WikidataIntegrator/issues/173#issuecomment-1397684609