chiefgeek157 added a comment.

  More info. Lines marked >>>RJC>>> are my debug prints.
  
    % pwb login
    >>>RJC>>> APISite.version()
    >>>RJC>>> SiteInfo._get_general(key=generator, expiry=1 day, 0:00:00
    >>>RJC>>> general not in self._cache
    >>>RJC>>> forcing
    >>>RJC>>> props: ['namespaces', 'namespacealiases', 'general']
    >>>RJC>>> SiteInfo._get_siteinfo(prop=['namespaces', 'namespacealiases', 
'general'], expiry=1 day, 0:00:00)
    >>>RJC>>> request: 
/w/api.php?action=query&meta=siteinfo&siprop=namespaces|namespacealiases|general&continue=
    WARNING: API error readapidenied: You need read permission to use this 
module.
    >>>RJC>>> Caught APIError: readapidenied: You need read permission to use 
this module.
    [help: See https://MYWIKI/w/api.php for API usage. Subscribe to the 
mediawiki-api-announce mailing list at 
<https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for 
notice of API deprecations and breaking changes.]
    >>>RJC>>> No read persmissions
    ERROR: You have no API read permissions. Seems you are not logged in.
    Logging in to my_family:en as me@me_bot
    WARNING: API warning (main): Subscribe to the mediawiki-api-announce 
mailing list at 
<https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for 
notice of API deprecations and breaking changes.
    WARNING: API warning (login): Fetching a token via "action=login" is 
deprecated. Use "action=query&meta=tokens&type=login" instead.
    >>>RJC>>> self.action: login
    >>>RJC>>> login_result: {'warnings': {'main': {'*': 'Subscribe to the 
mediawiki-api-announce mailing list at 
<https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for 
notice of API deprecations and breaking changes.'}, 'login': {'*': 'Fetching a 
token via "action=login" is deprecated. Use 
"action=query&meta=tokens&type=login" instead.'}}, 'login': {'result': 
'NeedToken', 'token': 'f71af5fc300dbd72908ede7648441f0263e120a0+\\'}}
    ERROR: Received incorrect login token. Forcing re-login.
    >>>RJC>>> TokenWallet.__getitem__(login)
    >>>RJC>>> self.site.user(): None
    >>>RJC>>> self._currentuser: None
    >>>RJC>>> self._tokens: {}
    >>>RJC>>> calling self.site.get_tokens([])
    >>>RJC>>> APISite.get_tokens([])
    >>>RJC>>> not type or load_all not false
    >>>RJC>>> ParamInfo.parameter(module=query+tokens, param_name=type
    >>>RJC>>> ParamInfo.fetch({'query+tokens'}
    >>>RJC>>> self._paraminfo: {}
    >>>RJC>>> calling self._init()
    >>>RJC>>> ParamInfo._init()
    >>>RJC>>> self._modules: {}
    >>>RJC>>> APISite.version()
    >>>RJC>>> SiteInfo._get_general(key=generator, expiry=1 day, 0:00:00
    >>>RJC>>> general not in self._cache
    >>>RJC>>> forcing
    >>>RJC>>> props: ['namespaces', 'namespacealiases', 'general']
    >>>RJC>>> SiteInfo._get_siteinfo(prop=['namespaces', 'namespacealiases', 
'general'], expiry=1 day, 0:00:00)
    >>>RJC>>> request: 
/w/api.php?action=query&meta=siteinfo&siprop=namespaces|namespacealiases|general&continue=
    WARNING: API error readapidenied: You need read permission to use this 
module.
    >>>RJC>>> Caught APIError: readapidenied: You need read permission to use 
this module.
  
  The last two lines are from site/_siteinfo.py:171 (give or take since I 
inserted prints)
  
  What this seems to say is that SiteInfo attempts to go get tokens, but the 
API request includes requests for info that are behind the login wall for the 
API. Rather than only getting the needed token, other info is also requested, 
and that info requires the user to already be logged in. So it will never 
succeed from what I can tell.

TASK DETAIL
  https://phabricator.wikimedia.org/T328814

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: chiefgeek157
Cc: Xqt, Aklapper, chiefgeek157, pywikibot-bugs-list, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Framawiki, Mdupont, JJMC89, TerraCodes, Dvorapa, Altostratus, Avicennasis, 
mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to