Xqt created this task.
Xqt added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  **Steps to replicate the issue** (include links if applicable):
  
    import pywikibot
    s = pywikibot.Site('comprehensibleinputwiki:en')
    s.login(user='unknown user 47110815')
  
  or
  
    s = pywikibot.Site('comprehensibleinputwiki:en', user='unknown user 
47110815')
    s.login()
  
  **What happens?**:
  
    WARNING: No user is logged in on site comprehensibleinputwiki:en
    Traceback (most recent call last):
      File "<pyshell#95>", line 1, in <module>
        s.login(user='unknown user 47110815')  # or s.login()
      File "D:\pwb\GIT\core\pywikibot\site\_apisite.py", line 417, in login
        if login_manager.login(retry=True, autocreate=autocreate):
      File "D:\pwb\GIT\core\pywikibot\login.py", line 282, in login
        self.check_user_exists()
      File "D:\pwb\GIT\core\pywikibot\login.py", line 136, in check_user_exists
        user = next(data)
      File "<frozen _collections_abc>", line 330, in __next__
      File "D:\pwb\GIT\core\pywikibot\tools\collections.py", line 275, in send
        return next(self._started_gen)
    StopIteration
  
  **What should have happened instead?**:
  
  Using a WM site like
  
    s = pywikibot.Site()
    s.login(user='unknown user 47110815')
  
  The warning is as follows:
  
    WARNING: No user is logged in on site wikipedia:de
    Traceback (most recent call last):
      File "<pyshell#99>", line 1, in <module>
        s.login(user='unknown user 47110815')
      File "D:\pwb\GIT\core\pywikibot\site\_apisite.py", line 417, in login
        if login_manager.login(retry=True, autocreate=autocreate):
      File "D:\pwb\GIT\core\pywikibot\login.py", line 282, in login
        self.check_user_exists()
      File "D:\pwb\GIT\core\pywikibot\login.py", line 146, in check_user_exists
        raise NoUsernameError("Username '{}' does not exist on {}"
    pywikibot.exceptions.NoUsernameError: Username 'Unknown user 47110815' does 
not exist on wikipedia:de
  
  **Software version** (skip for WMF-hosted wikis like Wikipedia):
  Pywikibot 7.0.0 (and earlier but cannot be tested due to syntax changes of 
Python 3.11

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

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

To: Xqt
Cc: Aklapper, pywikibot-bugs-list, Dimpizzy, Xqt, 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