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

TASK DESCRIPTION
  **Steps to replicate the issue** (include links if applicable):
  
  - Create or find a wiki with a page containing a mailto: link
  - Run weblinkchecker ("python pwb weblinkchecker.py") over that wiki
  
  **What happens?**:
  
  When pywikibot hits the page in question, it takes an exception, waits for 
outstanding threads to finish, and exits prematurely. The exception logging is 
this:
  
    Script terminated by exception: 
     
    ERROR: descriptor 'removeprefix' for 'str' objects doesn't apply to a 
'NoneType' object (TypeError) 
    Traceback (most recent call last): 
      File ".../pywikibot/pwb.py", line 40, in <module> 
        sys.exit(main()) 
      File ".../pywikibot/pwb.py", line 36, in main 
        runpy.run_path(str(path), run_name='__main__') 
      File "/opt/alt/python39/lib64/python3.9/runpy.py", line 288, in run_path 
        return _run_module_code(code, init_globals, run_name, 
      File "/opt/alt/python39/lib64/python3.9/runpy.py", line 97, in 
_run_module_code 
        _run_code(code, mod_globals, init_globals, 
      File "/opt/alt/python39/lib64/python3.9/runpy.py", line 87, in _run_code 
        exec(code, run_globals) 
      File ".../pywikibot/pywikibot/scripts/wrapper.py", line 554, in <module> 
        main() 
      File ".../pywikibot/pywikibot/scripts/wrapper.py", line 538, in main 
        if not execute(): 
      File ".../pywikibot/pywikibot/scripts/wrapper.py", line 525, in execute 
        run_python_file(filename, script_args, module) 
      File ".../pywikibot/pywikibot/scripts/wrapper.py", line 154, in 
run_python_file 
        exec(compile(source, filename, 'exec', dont_inherit=True), 
      File ".../pywikibot/scripts/weblinkchecker.py", line 695, in <module> 
        main() 
      File ".../pywikibot/scripts/weblinkchecker.py", line 691, in main 
        bot.run() 
      File ".../pywikibot/pywikibot/bot.py", line 1585, in run 
        self.treat(page) 
      File ".../pywikibot/pywikibot/bot.py", line 1832, in treat 
        self.treat_page() 
      File ".../pywikibot/scripts/weblinkchecker.py", line 573, in treat_page 
        thread.name = removeprefix( 
    TypeError: descriptor 'removeprefix' for 'str' objects doesn't apply to a 
'NoneType' object 
    CRITICAL: Exiting due to uncaught exception TypeError: descriptor 
'removeprefix' for 'str' objects doesn't apply to a 'NoneType' object 
  
  **What should have happened instead?**:
  
  The link should presumably be reported if it doesn't contain a 
correctly-formatted email address, and in any case life should go on.
  
  **Software version** (on `Special:Version` page; skip for WMF-hosted wikis 
like Wikipedia):
  
  MediaWiki 1.42.3, Pywikibot 9.6.3.
  
  **Other information** (browser name/version, screenshots, etc.):

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

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

To: Larrydberg
Cc: Aklapper, Larrydberg, pywikibot-bugs-list
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to