[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-09-25 Thread dimka
dimka added a comment. It's tenth wonder of the world TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, dimka Cc: dimka, MarcoAurelio, Nirvanchik, Xqt, Mpaa, Dvorapa, pywikibot-bugs-list,

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-02-25 Thread MarcoAurelio
MarcoAurelio added a comment. In T284577#8588228 , @Nirvanchik wrote: > I found a hotfix (workaround) that helped me to log in: > > class TokenWallet(Container): > > def __getitem__(self, key: str) -> str: >

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-02-17 Thread MarcoAurelio
MarcoAurelio added a comment. I can't login either to a private wiki using a botpassword, but in my case it's a private WMF wiki. After the cookie `*.lwp` data generated during `generate_user_files` expired, the bot keeps complaining that (a) the API method to retrieve tokens is deprecated

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-02-05 Thread Nirvanchik
Nirvanchik added a comment. I found a hotfix that helped me to log in: class TokenWallet(Container): def __getitem__(self, key: str) -> str: """Get token value for the given key.""" if self.site.user() is None and key != 'login':

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-02-05 Thread Nirvanchik
Nirvanchik added a comment. So it crashes while getting new token: ERROR: File "c:\work\wiki\bot\Python\git\core\pywikibot\site\_apisite.py", line 409, in login if login_manager.login(retry=True, autocreate=autocreate): ERROR: File

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-02-05 Thread Nirvanchik
Nirvanchik added a comment. In my case it tries to login without token (may be it relies that cookies may be available?) and fails. ERRORReceived incorrect login token. Forcing re-login. After that, it is making again query siteinfo URI:

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-02-05 Thread Nirvanchik
Nirvanchik added a comment. Wow. The problem I was writing about is handled already with using try-except. # May occur if you are not logged in (no API read permissions). except APIError: pass So I have another problem actually. TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-02-05 Thread Nirvanchik
Nirvanchik added a comment. This is where pywikibot is making request. Traceback (most recent call last): File "c:\work\wiki\bot\Python\git\core\pwb.py", line 39, in sys.exit(main()) File "c:\work\wiki\bot\Python\git\core\pwb.py", line 35, in main

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2023-02-04 Thread Nirvanchik
Nirvanchik added a comment. I also suffer of this problem :( TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Nirvanchik Cc: Nirvanchik, Xqt, Mpaa, Dvorapa, pywikibot-bugs-list, RhinosF1,

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread gerritbot
gerritbot added a comment. Change 699152 **merged** by jenkins-bot: [pywikibot/core@master] [bugfix] don't try to retrieve data until logged in https://gerrit.wikimedia.org/r/699152 TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread gerritbot
gerritbot added a comment. Change 699195 had a related patch set uploaded (by Xqt; author: Xqt): [pywikibot/core@master] [IMPR] Raise a RuntimeError if a MediaWiki version is used during login https://gerrit.wikimedia.org/r/699195 TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread ChrisBlomTS
ChrisBlomTS added a comment. I can confirm it works with the latest changes TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, ChrisBlomTS Cc: Xqt, Mpaa, Dvorapa, pywikibot-bugs-list,

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread Xqt
Xqt added a comment. In T284577#7148157 , @ChrisBlomTS wrote: > It doesn't, the mw_version check in api.Request.add_defaults() (line 1243) still fails. Ah, during get_login_token() I think. TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread ChrisBlomTS
ChrisBlomTS added a comment. It doesn't, the mw_version check in api.Request.add_defaults() (line 1243) still fails. TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, ChrisBlomTS Cc: Xqt,

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread ChrisBlomTS
ChrisBlomTS added a comment. Change 699152 seems like a cleaner solution, i'll check if it also works for my private wiki / BotPassword case TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To:

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread gerritbot
gerritbot added a comment. Change 699152 had a related patch set uploaded (by Xqt; author: Xqt): [pywikibot/core@master] [bugfix] don't try to retrieve data until logged in https://gerrit.wikimedia.org/r/699152 TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread ChrisBlomTS
ChrisBlomTS added a comment. Ok, i've tried that, but unfortunately there are a few other places in the codebase where calls to mw_version are made: For example here, in api.py, Request.add_defaults() via Request.submit() see:

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread Xqt
Xqt added a comment. I think the problem is the api.LoginManager.login_to_site code part. No further api calls should be necessary before login is either successfull or denied. A try/except clause instead of mw_version test should be made here TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-10 Thread ChrisBlomTS
ChrisBlomTS added a comment. I've created a pull request: https://gerrit.wikimedia.org/r/c/pywikibot/core/+/699137 TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: ChrisBlomTS Cc: Mpaa,

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-09 Thread ChrisBlomTS
ChrisBlomTS added a comment. I'm trying to submit a PR via gerrit, but get this error: 2021-06-09 17:46:27.819193 Running: git config --get gitreview.remote 2021-06-09 17:46:27.820819 ... gitreview.remote = origin 2021-06-09 17:46:27.820843 Config['remote'] = origin

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-09 Thread ChrisBlomTS
ChrisBlomTS added a comment. After some experimentation, i've come up with a possible fix: 1. Make it possible to specify the mediawiki version in the family file 2. If the mediawiki version is specified in the familiy file, use that version instead of getting it from the mediawiki

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-08 Thread ChrisBlomTS
ChrisBlomTS added a comment. These are the permission settings: # The following permissions were set based on your choice in the installer $wgGroupPermissions['*']['createaccount'] = true; $wgGroupPermissions['*']['autocreateaccount'] = false;

[Pywikipedia-bugs] [Maniphest] [Commented On] T284577: Cannot login to private wiki using BotPassword

2021-06-08 Thread ChrisBlomTS
ChrisBlomTS added a comment. A self-hosted wiki. TASK DETAIL https://phabricator.wikimedia.org/T284577 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: ChrisBlomTS Cc: pywikibot-bugs-list, RhinosF1, Urbanecm, Aklapper, ChrisBlomTS, Jyoo1011,