Where are the logins stored? In compat they had an obvious directory. Now I searched it a lot, but did not find.
Whenever I run login.py, the previous account is thrown out, so I cannot comfortably use two accounts. Is it on purpose?
They are stored in pywikibot.lwp file in the config.datafilepath. Have you used the -user option together with login e.g.
pwb -user:Foo login -all
?
Best xqt
Am 28.11.2022 um 11:41 schrieb Bináris wikiposta@gmail.com:
Where are the logins stored? In compat they had an obvious directory. Now I searched it a lot, but did not find.
Whenever I run login.py, the previous account is thrown out, so I cannot comfortably use two accounts. Is it on purpose?
-- Bináris _______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
Yes. BinBot is the bot account and Bináris is the admin account. The second login throws out the previous one. Respectively:
c:\Pywikibot>python pwb.py -user:Bináris login -all ERROR: wikipedia:* is not a valid site, please remove it from your user-config Password for user Bináris on wikipedia:hu (no characters will be shown): Logging in to wikipedia:hu as Bináris Logged in on wikipedia:hu as Bináris.
c:\Pywikibot>python pwb.py -user:BinBot login -all ERROR: wikipedia:* is not a valid site, please remove it from your user-config Password for user BinBot on wikipedia:hu (no characters will be shown): Logging in to wikipedia:hu as BinBot Logged in on wikipedia:hu as BinBot.
c:\Pywikibot>python pwb.py -nolog -user:Bináris userpageprotect.py pywikibot.exceptions.UserRightsError: User "None" does not have required user right "protect" CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.UserRightsError'>
I found BinBot only in pywikibot.lwp. Now I have logged in again as Bináris with the above command. pywikibot.lwp (with ctrl f) contains Bináris, but does not contain BinBot. For some reason only one user is in it at a time.
Thank you for this example. I’ll have a look on this issue and will try to find a solution.
Best xqt
Von meinem iPhone gesendet
Am 28.11.2022 um 20:38 schrieb Bináris wikiposta@gmail.com:
Yes. BinBot is the bot account and Bináris is the admin account. The second login throws out the previous one. Respectively:
c:\Pywikibot>python pwb.py -user:Bináris login -all ERROR: wikipedia:* is not a valid site, please remove it from your user-config Password for user Bináris on wikipedia:hu (no characters will be shown): Logging in to wikipedia:hu as Bináris Logged in on wikipedia:hu as Bináris.
c:\Pywikibot>python pwb.py -user:BinBot login -all ERROR: wikipedia:* is not a valid site, please remove it from your user-config Password for user BinBot on wikipedia:hu (no characters will be shown): Logging in to wikipedia:hu as BinBot Logged in on wikipedia:hu as BinBot.
c:\Pywikibot>python pwb.py -nolog -user:Bináris userpageprotect.py pywikibot.exceptions.UserRightsError: User "None" does not have required user right "protect" CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.UserRightsError'> _______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
I made a workaround so that I don't heve to log in all the time. :-) swap.bat is: ren other.lwp temp.lwp ren pywikibot.lwp other.lwp ren temp.lwp pywikibot.lwp del temp.lwp
So I have to type swap and everything is fine. But I still don't know if I have to use both accounts in one script. In compat there was a sysopname in config, and it automatically switched to that if it was needed.
I created T324000 for cookie improvements.
Best xqt
Am 28.11.2022 um 21:52 schrieb Bináris wikiposta@gmail.com:
I made a workaround so that I don't heve to log in all the time. :-) swap.bat is: ren other.lwp temp.lwp ren pywikibot.lwp other.lwp ren temp.lwp pywikibot.lwp del temp.lwp
So I have to type swap and everything is fine. But I still don't know if I have to use both accounts in one script. In compat there was a sysopname in config, and it automatically switched to that if it was needed. _______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
This is Windows driven where .py is associated with Python.exe which was set during installation.
Von meinem iPhone gesendet
Am 29.11.2022 um 16:38 schrieb Bináris wikiposta@gmail.com:
Thank you! How does pwb work for you without .py? _______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org