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

TASK DESCRIPTION
  **Steps to replicate the issue** (include links if applicable):
  
  After rPWBC68f381a 
<https://phabricator.wikimedia.org/rPWBC68f381a435dd99b0c059da5113141798aa5d897f>
 all I tests fail on Appveyour and Github but Jenkins tests pass.
  https://ci.appveyor.com/project/Ladsgroup/pywikibot-g4xqx/builds/45149656
  https://github.com/wikimedia/pywikibot/actions/runs/3303080633
  
  **What happens?**:
  running generate_user_files.py does  not respect the 
`_import_with_no_user_config()` call which should happen here.
  
    python -Werror::UserWarning -m pwb generate_user_files -dir:%PYWIKIBOT_DIR% 
-family:wikipedia -lang:en -v -debug -user:%PYWIKIBOT_USERNAME%
    Traceback (most recent call last):
      File "C:\Python37-x64\lib\runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "C:\Python37-x64\lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "C:\projects\pywikibot-g4xqx\pwb.py", line 36, in <module>
        sys.exit(main())
      File "C:\projects\pywikibot-g4xqx\pwb.py", line 31, in main
        from pywikibot.scripts import wrapper
      File "C:\projects\pywikibot-g4xqx\pywikibot\__init__.py", line 21, in 
<module>
        from pywikibot import config as _config
      File "C:\projects\pywikibot-g4xqx\pywikibot\config.py", line 405, in 
<module>
        base_dir = get_base_dir(config_file=user_config_file)
      File "C:\projects\pywikibot-g4xqx\pywikibot\config.py", line 394, in 
get_base_dir
        raise RuntimeError(exc_text)
    RuntimeError: No user-config.py found in directory 
'C:\\Users\\appveyor\\AppData\\Roaming\\Pywikibot'.
      Please check that user-config.py is stored in the correct location.
      Directory where user-config.py is searched is determined as follows:
        Return the directory in which user-specific information is stored.
        This is determined in the following order:
         1.  If the script was called with a `-dir:` argument, use the
             directory provided in this argument.
         2.  If the user has a `PYWIKIBOT_DIR` environment variable, use the
             value of it.
         3.  If `user-config` is present in current directory, use the
             current directory.
         4.  If `user-config` is present in `pwb.py` directory, use that
             directory
         5.  Use (and if necessary create) a `'pywikibot'` folder under
             `'Application Data'` or `'AppData\Roaming'` (Windows) or
             `'.pywikibot'` directory (Unix and similar) under the user's
             home directory.
        Set `PYWIKIBOT_NO_USER_CONFIG=1` to disable loading user config file
        (`user-config.py`) or install Pywikibot as a site-package.
        .. versionchanged:: 7.7
           Added the *config_file* parameter.
        :param test_directory: Assume that a user config file exists in this
            directory. Used to test whether placing a user config file in this
            directory will cause it to be selected as the base directory.
        :param config_file: filename of the user config file
  
  **What should have happened instead?**:
  Pywikibot must not try to install the user-config.py file
  
  **Software version** (skip for WMF-hosted wikis like Wikipedia):
  Pywikibot 8.0.0 after rPWBC68f381a 
<https://phabricator.wikimedia.org/rPWBC68f381a435dd99b0c059da5113141798aa5d897f>

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

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

To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, 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 -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org

Reply via email to