Dominicbm added a comment.

  In T345209#9129778 <https://phabricator.wikimedia.org/T345209#9129778>, @Xqt 
wrote:
  
  > Instantiation the APISite tries to login with stored cookies but it does 
not use //autocreate// [1] for logging in. There might be reasons for it; or 
should there be a config setting to enable it? A possible way to prevent this 
issue is to login first via login script: `pwb login -all -autocreate -async` 
[2] but I am not really sure whether this works for oauth login because this is 
quite different from client login.
  >
  > [1] 
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.site.html#pywikibot.site._apisite.APISite.login
  > [2] 
https://doc.wikimedia.org/pywikibot/master/utilities/scripts.html#login-script
  
  I tried this, at least in the PAWS environment, but the behavior was odd:
  
    @PAWS:~$ pwb login -all -autocreate -async
    Logged in on commons:commons as DPLA bot.
    ERROR: commons:* is not a valid site, please remove it from your user-config
    ERROR: wikimedia:* is not a valid site, please remove it from your 
user-config
    ERROR: wikipedia:* is not a valid site, please remove it from your 
user-config
    ERROR: wikiquote:* is not a valid site, please remove it from your 
user-config
    ERROR: wikisource:* is not a valid site, please remove it from your 
user-config
    ERROR: wikiversity:* is not a valid site, please remove it from your 
user-config
    ERROR: wikibooks:* is not a valid site, please remove it from your 
user-config
    ERROR: wiktionary:* is not a valid site, please remove it from your 
user-config
    ERROR: wikidata:* is not a valid site, please remove it from your 
user-config
    ERROR: wikinews:* is not a valid site, please remove it from your 
user-config
    ERROR: wikivoyage:* is not a valid site, please remove it from your 
user-config
    WARNING: 
/srv/paws/lib/python3.10/site-packages/pywikibot/scripts/login.py:98: 
UserWarning: Site meta:meta instantiated using different code "*"
      site = pywikibot.Site(code, family)
    
    Logged in on meta:meta as DPLA bot.
    WARNING: 
/srv/paws/lib/python3.10/site-packages/pywikibot/scripts/login.py:98: 
UserWarning: Site mediawiki:mediawiki instantiated using different code "*"
      site = pywikibot.Site(code, family)
    
    Logged in on mediawiki:mediawiki as DPLA bot.
    
    Execution time: 1 seconds

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

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

To: Dominicbm
Cc: Xqt, Aklapper, pywikibot-bugs-list, Dominicbm, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, 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