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

TASK DESCRIPTION
  I can edit Wikipedia, but cannot retrieve wachlist. The bot seems to be 
logged in and not logged in like Schrödinger's cat at the same time without 
pywikibot.lwp being present. I definitely deleted it, but bot still complains.
  Command line:
  
    `
    c:\Pywikibot>python pwb.py -nolog _myscript.py
    WARNING: API error notloggedin: Please log in to view or edit items on your 
watchlist.
    
    c:\Pywikibot>python pwb.py -nolog login
    Logged in on wikipedia:hu as BinBot.
    
    c:\Pywikibot>rename pywikibot.lwp pywikibot-BinBot2.lwp
    
    c:\Pywikibot>python pwb.py -nolog login
    Logged in on wikipedia:hu as BinBot.
    
    c:\Pywikibot>python pwb.py -nolog login -force
    To force a re-login, please delete the revelant lines from 
'c:\Pywikibot\pywikibot.lwp' (or the entire file) and try again.
    Logged in on wikipedia:hu as BinBot.
    
    c:\Pywikibot>del pywikibot.lwp
    A következő fájl nem található: c:\Pywikibot\pywikibot.lwp (This means file 
not found.)
    
    c:\Pywikibot>python pwb.py -nolog login -force
    To force a re-login, please delete the revelant lines from 
'c:\Pywikibot\pywikibot.lwp' (or the entire file) and try again.
    Logged in on wikipedia:hu as BinBot.
    
    c:\Pywikibot>dir c:\Pywikibot\pywikibot.lwp
    
    A fájl nem található. (This means file not found.)
    
    c:\Pywikibot>python pwb.py -nolog replace a b -page:user:BinBot/semmi 
-always -summary:"This sould not be saved, the bot is logged out"
    Edit summary: This sould not be saved, the bot is logged out
    Page [[Szerkesztő:BinBot/semmi]] saved
    
    1 read operation
    1 write operation
    Execution time: 5 seconds
    Read operation time: 5.0 seconds
    Write operation time: 5.0 seconds
    Script terminated successfully.
    `
  
  **Steps to replicate the issue** (include links if applicable): see above.
  
  **What happens?**:  Difflink: 
https://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:BinBot/semmi&curid=897695&diff=25853451&oldid=25838109
  
  **What should have happened instead?**: Either be logged in or logged out. 
Definitely logged out after deleting pywikibot.lwp. -force should work in any 
circumstances, otherwise it is not a force.
  
  **Software version** (skip for WMF-hosted wikis like Wikipedia):
  
    c:\Pywikibot>python pwb.py -nolog version
    Pywikibot: [https] r-pywikibot-core.git (b678f2e, g1, 2023/01/21, 12:29:25, 
OUTDATED)
    Release version: 8.0.0
    requests version: 2.25.1
      cacerts: C:\Python37\lib\site-packages\certifi\cacert.pem
        certificate test: ok
    Python: 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 
64 bit (AMD64)]
    PYWIKIBOT_DIR: Not set
    PYWIKIBOT_DIR_PWB: pywikibot\scripts
    PYWIKIBOT_NO_USER_CONFIG: Not set
    Traceback (most recent call last):
      File "pwb.py", line 39, in <module>
        sys.exit(main())
      File "pwb.py", line 35, in main
        runpy.run_path(str(path), run_name='__main__')
      File "C:\Python37\lib\runpy.py", line 263, in run_path
        pkg_name=pkg_name, script_name=fname)
      File "C:\Python37\lib\runpy.py", line 96, in _run_module_code
        mod_name, mod_spec, pkg_name, script_name)
      File "C:\Python37\lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "pywikibot\scripts\wrapper.py", line 516, in <module>
        main()
      File "pywikibot\scripts\wrapper.py", line 500, in main
        if not execute():
      File "pywikibot\scripts\wrapper.py", line 487, in execute
        run_python_file(filename, script_args, module)
      File "pywikibot\scripts\wrapper.py", line 148, in run_python_file
        main_mod.__dict__)
      File "scripts\version.py", line 85, in <module>
        main()
      File "scripts\version.py", line 75, in main
        pywikibot.output('Config base dir: ' + pywikibot.config2.base_dir)
    AttributeError: module 'pywikibot' has no attribute 'config2'
    CRITICAL: Exiting due to uncaught exception <class 'AttributeError'>

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

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

To: binbot
Cc: Aklapper, pywikibot-bugs-list, binbot, PotsdamLamb, Jyoo1011, JohnsonLee01, 
SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Framawiki, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org

Reply via email to