Steps to replicate the issue (include links if applicable):
- Debian 11 with Python 3.9.2
- Create virtual environment in target folder: python3 -m venv venv
- Activate virtual environment: source ./venv/bin/activate
- Install requirements: pip install -r requirements.txt or just pip install py-postgresql pywikibot
# requirements.txt certifi==2024.8.30 charset-normalizer==3.4.0 idna==3.10 mwparserfromhell==0.6.6 packaging==24.2 pkg_resources==0.0.0 py-postgresql==1.3.0 pywikibot==9.6.0 requests==2.32.3 urllib3==2.2.3
- Input command: pwb generate_user_files
What happens?:
Error raises (I changed part of target directory path to "..."):
Traceback (most recent call last):
File "/home/.../venv/bin/pwb", line 8, in <module>
sys.exit(run())
File "/home/.../venv/lib/python3.9/site-packages/pywikibot/scripts/wrapper.py", line 539, in run
if not execute():
File "/home/.../venv/lib/python3.9/site-packages/pywikibot/scripts/wrapper.py", line 479, in execute
filename = find_filename(filename)
File "/home/.../venv/lib/python3.9/site-packages/pywikibot/scripts/wrapper.py", line 425, in find_filename
for ep in entry_points(name='scriptspath', group='pywikibot'):
TypeError: entry_points() got an unexpected keyword argument 'name'
CRITICAL: Exiting due to uncaught exception TypeError: entry_points() got an unexpected keyword argument 'name'We can see that pywikibot wrapper.py module uses only "new-style" entry_points() function from importlib.metadata.
What should have happened instead?:
Steps for generating user-config.py file (it works for Python 3.12)
Software version
- Debian GNU/Linux 11 (bullseye)
- Python 3.9.2
- pywikibot 9.6.0