jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1347452?usp=email )
Change subject: pwb: Suggest installing all requirements for missing
dependencies
......................................................................
pwb: Suggest installing all requirements for missing dependencies
ModuleNotFoundError may be raised for the first Pywikibot call
if packaging or requests is not installed. Suggest installing
all requirements instead of the given single module.
Change-Id: I5b067f3ca7e18cfdddc5c84869279fef569ddcec
---
M pywikibot/scripts/wrapper.py
1 file changed, 10 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Mahveotm: Looks good to me, approved
diff --git a/pywikibot/scripts/wrapper.py b/pywikibot/scripts/wrapper.py
index 4ea366d..6ec180f 100755
--- a/pywikibot/scripts/wrapper.py
+++ b/pywikibot/scripts/wrapper.py
@@ -331,8 +331,16 @@
print('Now, you have to re-execute the command to start your script.')
sys.exit(1)
except ModuleNotFoundError as module: # raised in textlib or backports
- print(f'\n{module.msg}\nPlease install it with\n\n'
- f' pip install {module.name}')
+ print(f"""
+{module.msg}
+Please install it with
+
+ pip install {module.name}
+
+or install all requirements with
+
+ pip install -r requirements.txt
+""")
sys.exit()
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1347452?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5b067f3ca7e18cfdddc5c84869279fef569ddcec
Gerrit-Change-Number: 1347452
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Mahveotm <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]