Hi Larry,

there are two way to use Pywikibot as a side package:
1. add a user-config.py in your /variant folder. A minimal sample can be found at https://gerrit.wikimedia.org/r/plugins/gitiles/pywikibot/core/+/88f22977fd186d888c4d9e8cbac11d76e87bd607/user-config.py.sample
2. or set a PYWIKIBOT_NO_USER_CONFIG environment variable to 1 or 2 to ignore user-config settings

The pwb.py script wrapper (as well as the generate_... scripts are available in directory mode only. You can get it including predefined scripts from nightly https://pywikibot.toolforge.org/ or as git repository from gerrit or from github clone https://github.com/wikimedia/pywikibot

Adding pwb.py and generate_user_files.py/generate_family_file.py to side oackage is still under development https://gerrit.wikimedia.org/r/c/pywikibot/core/+/560057

Seem our documentation is insufficient, sorry for that. If you have further questions do not hesitate to ask.

Best

xqt
Am 17.08.2020 um 21:41 schrieb Larry Martell <larry.martell@gmail.com>:

We have an internal wiki and I want to use pywikibot to get some data
from it. Installed it from pip but when I import it I get:

import pywikibot
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/local/lib/python3.7/site-packages/pywikibot/__init__.py",
line 25, in <module>
   from pywikibot.bot import (
 File "/usr/local/lib/python3.7/site-packages/pywikibot/bot.py", line
105, in <module>
   from pywikibot import config2 as config
 File "/usr/local/lib/python3.7/site-packages/pywikibot/config2.py",
line 373, in <module>
   base_dir = get_base_dir()
 File "/usr/local/lib/python3.7/site-packages/pywikibot/config2.py",
line 367, in get_base_dir
   raise RuntimeError(exc_text)
RuntimeError: No user-config.py found in directory '/vagrant'.

Looking here https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation#Configure_Pywikibot

I see a reference to pwb.py, but that does not exist in
/usr/local/lib/python3.7/site-packages/pywikibot.

What am I missing here?

Thanks!

_______________________________________________
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot