Hi,

your Pywikibot looks outdated. Either setup a user-config.py like the sample 
here [1] or update your Pywikibot; never Version does not require it but it is 
recommended.

Best
xqt

[1] 
https://gerrit.wikimedia.org/r/plugins/gitiles/pywikibot/core/+/15ca230277dcb55526e345ff0692eda0e777bff7/user-config.py.sample


> Am 27.06.2021 um 20:58 schrieb ישראל קלר <[email protected]>:
> 
> 
> 
> Hello, I wrote "import pywikibot", and that was the result. What to do?
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File 
> "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\pywikibot\__init__.py",
>  line 26, in <module>
>     from pywikibot.bot import (
>   File 
> "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\pywikibot\bot.py", 
> line 106, in <module>
>     from pywikibot import config2 as config
>   File 
> "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\pywikibot\config2.py",
>  line 383, in <module>
>     base_dir = get_base_dir()
>   File 
> "C:\Users\user\AppData\Local\Programs\Python\Python37\lib\pywikibot\config2.py",
>  line 375, in get_base_dir
>     raise RuntimeError(exc_text)
> RuntimeError: No user-config.py found in directory 'C:\\Users\\user'.
>   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.py or
>     install pywikibot as a site-package.
>  
>     @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.
> 
> _______________________________________________
> pywikibot mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
_______________________________________________
pywikibot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to