bd808 added a comment.
In T168222#6452361 <https://phabricator.wikimedia.org/T168222#6452361>, @Geertivp wrote: > The local Pywikibot works, even if it is an older version. > It is the PAWS Jupyter Pywikibot that does not work... > https://hub.paws.wmcloud.org/user/GeertivpBot/notebooks/missing_person_label.ipynb Public link for that notebook is https://public.paws.wmcloud.org/User:GeertivpBot/missing_person_label.ipynb. The error shown in the public render is "WARNING: API error mwoauth-invalid-authorization-invalid-user: The authorization headers in your request are for a user that does not exist here" which at least at first glance seems to be more about the pywikibot credentials in use than the pywikibot library itself. In T168222#6449491 <https://phabricator.wikimedia.org/T168222#6449491>, @Geertivp wrote: > In both cases I am using exactly the same user-config.py file and the same Pywikibot script. I'm wondering if this is actually the bug. The Pywikibot integration with PAWS is designed to pass the OAuth grant information from PAWS through to Pywikibot. If @Geertivp's user-config.py is messing with this somehow that could cause the "mwoauth-invalid-authorization-invalid-user" errors. In T168222#6457593 <https://phabricator.wikimedia.org/T168222#6457593>, @Geertivp wrote: > Simple code example that fails with "mwoauth-invalid-authorization-invalid-user" in a PAWS Jupyter workbook because there is a P18 <https://phabricator.wikimedia.org/P18> property, but runs correctly in a standalone Pywikibot client... > > import pywikibot > from pywikibot import pagegenerators as pg > querytxt = 'SELECT DISTINCT ?item WHERE { ?Joseph_von_Hammer_Purgstall wdt:P921 wd:Q89546, ?item. }' > wikidata_site = pywikibot.Site("wikidata", "wikidata") > generator = pg.WikidataSPARQLPageGenerator(querytxt, site=wikidata_site) > for item in generator: > item.get() https://public.paws.wmcloud.org/User:BDavis_(WMF)/T168222%20test.ipynb is this code sample run under my PAWS user which has an empty $HOME/user-config.py. TASK DETAIL https://phabricator.wikimedia.org/T168222 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: bd808 Cc: bd808, Xqt, Mpaa, Geertivp, Aklapper, BernhardHumm, Tdbot, Dvorapa, pywikibot-bugs-list, zhuyifei1999, Chicocvenancio, Knuthuehne, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, AshokChakra, Viztor, 94rain, Wenyi, R96340, Allthingsgo, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, mys_721tx, Jane023, yuvipanda, Capt_Swing, jayvdb, Ricordisamoa, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
