Mpaa added a comment.
In T252306#6156215 <https://phabricator.wikimedia.org/T252306#6156215>, @RhinosF1 wrote: > In T252306#6156204 <https://phabricator.wikimedia.org/T252306#6156204>, @Chicocvenancio wrote: > >> I can reproduce this https://paws-public.wmflabs.org/paws-public/User:chicocvenancio/T252306.ipynb it tells me I don't have an account in az:wikibooks. > > https://meta.wikimedia.org/wiki/Special:CentralAuth?target=Chicocvenancio shows you don’t ? I have noticed two things. 1. if you visit the page via browser, from that point on the wiki becomes visible in https://meta.wikimedia.org/wiki/Special:CentralAuth?target=Chicocvenancio 2. the issue is in this section of api.py def _use_get(self): """Verify whether 'get' is to be used.""" if (not config.enable_GET_without_SSL and self.site.protocol() != 'https' or self.site.is_oauth_token_available()): # T108182 workaround use_get = False elif self.use_get is None: if self.action == 'query': # for queries check the query module modules = set() for mod_type_name in ('list', 'prop', 'generator'): modules.update(self._params.get(mod_type_name, [])) else: modules = {self.action} if modules: self.site._paraminfo.fetch(modules) use_get = all('mustbeposted' not in self.site._paraminfo[mod] for mod in modules) else: # If modules is empty, just 'meta' was given, which doesn't # require POSTs, and is required for ParamInfo use_get = True else: use_get = self.use_get return use_get self.site.is_oauth_token_available() is always True for all sites because PAWS sets in user-config.py: # If OAuth integration is available, take it if 'CLIENT_ID' in os.environ: authenticate['*'] = ( os.environ['CLIENT_ID'], os.environ['CLIENT_SECRET'], os.environ['ACCESS_KEY'], os.environ['ACCESS_SECRET'] ) So the api request is done with use_get = False. (e.g. API request to wikiquote:az (uses get: False)). If I change PAWS user-config.py and remove oAuth, it will use use_get = True and the script will not fail. I do not know yet why GET/POST make a difference though. TASK DETAIL https://phabricator.wikimedia.org/T252306 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Mpaa Cc: Mpaa, matej_suchanek, Xqt, RhinosF1, pywikibot-bugs-list, Chicocvenancio, Edoderoo, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Ricordisamoa, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
