I'm trying to single-step through pywikibot using vscode. I've got:
certifi==2024.2.2
charset-normalizer==3.3.2
idna==3.6
iniconfig==2.0.0
mwparserfromhell==0.6.6
packaging==23.2
pluggy==1.4.0
pytest==8.0.2
pytest-mock==3.12.0
pywikibot==8.6.0
requests==2.31.0
urllib3==2.2.1
vscode: Version: 1.87.1
MacOS Ventura 13.6.4
Python 3.11.8
I'm getting a bunch of Pylance errors (warnings?) _basepage.py of the form:
Variable not allowed in type expression
It seems to be complaining about the "Dict" in:
def protection(self) -> Dict[str, Tuple[str, str]]:
Any idea what's going on?
Dear Pywikibot Contributors,
I trust this message finds you well. My name is Abdulrhman Adel, and I'm
enthusiastic about the prospect of contributing to the Pywikibot project.
In my journey as a developer, I've had the opportunity to work on various
projects, including several Python projects developed for hackathons. One
of my most significant achievements is the creation of the A.I.S.L a Sign
Language Assistant. This bot was specifically designed to assist
individuals with sign language.
Pywikibot's role as a Python library and automation tool, developed for
Wikipedia, has captured my interest and I'm eager to contribute my skills
and insights to enhance Pywikibot's capabilities.
Feel free to explore my GitHub profile
<https://github.com/abdulrhman-adel/>and my repositories to gain insight
into my coding style and previous contributions.
Having reviewed the Pywikibot documentation and contributor guidelines, I
am enthusiastic about the prospect of getting involved. Could you please
provide guidance on the next steps or point me to tasks suitable for
newcomers?
Thank you for your time and consideration. I am looking forward to the
opportunity to collaborate with the Pywikibot community.
Best regards,
Abdulrhman Adel
Hi.
I launch it with the command:
python pwb.py interwiki -start:!
And the work will stop with the error:
Error: [[en:]]: The requested page title is empty or contains only the name of a namespace.
I've searched all over the wiki and can't find what article it's in [[en:]].
There's a last line on the screen,
.======Post-processing [[es:Historia y mundo]]====== ,
but it's not the same article
How can I find out which article is causing my work to stop?
-
in interwiki-dumps/dragonsdogma-es.txt 126 records.
Log:
2024-02-19 11:02:36 interwiki.py, 1431 in post_processing: INFO ======Post-processing [[es:Ignitia]]======
2024-02-19 11:02:36 interwiki.py, 1431 in post_processing: INFO ======Post-processing [[es:Historia y mundo]]======
2024-02-19 11:02:36 interwiki.py, 1431 in post_processing: INFO ======Post-processing [[es:Historia y mundo]]======
2024-02-19 11:02:36 _generators.py, 265 in __init__: VERBOSE PropertyGenerator: multiple requested query modules support limits; using the first such module 'revisions' of ['revisions', 'info', 'categoryinfo', 'templates', 'langlinks', 'pageprops']
2024-02-19 11:02:36 _generators.py, 265 in __init__: VERBOSE PropertyGenerator: multiple requested query modules support limits; using the first such module 'revisions' of ['revisions', 'info', 'categoryinfo', 'templates', 'langlinks', 'pageprops']
2024-02-19 11:02:36 _generators.py, 408 in _update_limit: DEBUG PropertyGenerator: Set query_limit to 5000.
2024-02-19 11:02:36 _generators.py, 408 in _update_limit: DEBUG PropertyGenerator: Set query_limit to 5000.
2024-02-19 11:02:36 _generators.py, 167 in preloadpages: INFO Retrieving 50 pages from dragonsdogma:en.
2024-02-19 11:02:36 _generators.py, 167 in preloadpages: INFO Retrieving 50 pages from dragonsdogma:en.
2024-02-19 11:02:36 _requests.py, 660 in _get_request_params: DEBUG API request to dragonsdogma:en (uses get: False):
Headers: {'Content-Type': 'application/x-www-form-urlencoded'}
URI: '/api.php'
Body: 'prop=revisions%7Cinfo%7Ccategoryinfo%7Ctemplates%7Clanglinks%7Cpageprops&action=query&indexpageids=&continue=&tllimit=5000&lllimit=5000&rvslots=%2A&titles=Phantasm%7CEsperaunce%7CPhantom%7CSkeleton%7CSkeleton+Brute%7CBarn%7CEstevon%7CStilettos%7CGolden+Stilettos%7CAneled+Stilettos%7CStage+6%7CPost-Game%7CStage+1%7CA+Soldier%27s+Survey%7CSerenity+Extract%7CVigor+Extract%7CFalchion%7CSpecter%7CFedel%7CFeste%7CBeast-Steak%7CRotten+Beast-Steak%7CGransys+Flamberge%7CFlavian%7CPoison+Arrow%7COil+Arrow%7CThornflower%7CJasper+Blossom%7CLava+Flower%7CCapeflower%7CNoonflower%7CWindmill+Flower%7CGodsthrone+Blossom%7CGrandblossom%7CWilted+Blossom%7CKept+Wilted+Blossom%7CLoneflower%7C%7CStout+Undead%7CFournival%7CWakestone+Shard%7CFredro%7CFire%7CFont+of+Constitution%7CFont+of+Vigor%7CBlack+Eyeglasses%7CDominion+Claw%7CDevil%27s+Nail%7CGarvin%7CSeabird&rvprop=comment%7Ccontentmodel%7Cflags%7Cids%7Cparsedcomment%7Csha1%7Csize%7Ctags%7Ctimestamp%7Cuser%7Cuserid%7Ccontent%7Croles&meta=userinfo&uiprop=blockinfo%7Chasmsg&maxlag=5&format=json'
2024-02-19 11:02:36 _requests.py, 660 in _get_request_params: DEBUG API request to dragonsdogma:en (uses get: False):
Headers: {'Content-Type': 'application/x-www-form-urlencoded'}
URI: '/api.php'
Body: 'prop=revisions%7Cinfo%7Ccategoryinfo%7Ctemplates%7Clanglinks%7Cpageprops&action=query&indexpageids=&continue=&tllimit=5000&lllimit=5000&rvslots=%2A&titles=Phantasm%7CEsperaunce%7CPhantom%7CSkeleton%7CSkeleton+Brute%7CBarn%7CEstevon%7CStilettos%7CGolden+Stilettos%7CAneled+Stilettos%7CStage+6%7CPost-Game%7CStage+1%7CA+Soldier%27s+Survey%7CSerenity+Extract%7CVigor+Extract%7CFalchion%7CSpecter%7CFedel%7CFeste%7CBeast-Steak%7CRotten+Beast-Steak%7CGransys+Flamberge%7CFlavian%7CPoison+Arrow%7COil+Arrow%7CThornflower%7CJasper+Blossom%7CLava+Flower%7CCapeflower%7CNoonflower%7CWindmill+Flower%7CGodsthrone+Blossom%7CGrandblossom%7CWilted+Blossom%7CKept+Wilted+Blossom%7CLoneflower%7C%7CStout+Undead%7CFournival%7CWakestone+Shard%7CFredro%7CFire%7CFont+of+Constitution%7CFont+of+Vigor%7CBlack+Eyeglasses%7CDominion+Claw%7CDevil%27s+Nail%7CGarvin%7CSeabird&rvprop=comment%7Ccontentmodel%7Cflags%7Cids%7Cparsedcomment%7Csha1%7Csize%7Ctags%7Ctimestamp%7Cuser%7Cuserid%7Ccontent%7Croles&meta=userinfo&uiprop=blockinfo%7Chasmsg&maxlag=5&format=json'
2024-02-19 11:02:37 _requests.py, 779 in _relogin: ERROR Logged in as '95.25.124.157' instead of 'Vzhik-bot'. Forcing re-login.
2024-02-19 11:02:37 _requests.py, 779 in _relogin: ERROR Logged in as '95.25.124.157' instead of 'Vzhik-bot'. Forcing re-login.
2024-02-19 11:02:37 http.py, 89 in load: DEBUG Loaded cookies for user Vzhik-bot from file.
2024-02-19 11:02:37 http.py, 89 in load: DEBUG Loaded cookies for user Vzhik-bot from file.
2024-02-19 11:02:37 _requests.py, 660 in _get_request_params: DEBUG API request to dragonsdogma:en (uses get: True):
Headers: {'Content-Type': 'application/x-www-form-urlencoded'}
URI: '/api.php?action=query&meta=userinfo&uiprop=blockinfo%7Cgroups%7Chasmsg%7Cratelimits%7Crights&formatversion=2&maxlag=5&format=json'
Body: None
2024-02-19 11:02:37 _requests.py, 660 in _get_request_params: DEBUG API request to dragonsdogma:en (uses get: True):
Headers: {'Content-Type': 'application/x-www-form-urlencoded'}
URI: '/api.php?action=query&meta=userinfo&uiprop=blockinfo%7Cgroups%7Chasmsg%7Cratelimits%7Crights&formatversion=2&maxlag=5&format=json'
Body: None
2024-02-19 11:02:37 _requests.py, 660 in _get_request_params: DEBUG API request to dragonsdogma:en (uses get: False):
Headers: {'Content-Type': 'application/x-www-form-urlencoded'}
URI: '/api.php'
Body: 'prop=revisions%7Cinfo%7Ccategoryinfo%7Ctemplates%7Clanglinks%7Cpageprops&action=query&indexpageids=&continue=&tllimit=5000&lllimit=5000&rvslots=%2A&titles=Phantasm%7CEsperaunce%7CPhantom%7CSkeleton%7CSkeleton+Brute%7CBarn%7CEstevon%7CStilettos%7CGolden+Stilettos%7CAneled+Stilettos%7CStage+6%7CPost-Game%7CStage+1%7CA+Soldier%27s+Survey%7CSerenity+Extract%7CVigor+Extract%7CFalchion%7CSpecter%7CFedel%7CFeste%7CBeast-Steak%7CRotten+Beast-Steak%7CGransys+Flamberge%7CFlavian%7CPoison+Arrow%7COil+Arrow%7CThornflower%7CJasper+Blossom%7CLava+Flower%7CCapeflower%7CNoonflower%7CWindmill+Flower%7CGodsthrone+Blossom%7CGrandblossom%7CWilted+Blossom%7CKept+Wilted+Blossom%7CLoneflower%7C%7CStout+Undead%7CFournival%7CWakestone+Shard%7CFredro%7CFire%7CFont+of+Constitution%7CFont+of+Vigor%7CBlack+Eyeglasses%7CDominion+Claw%7CDevil%27s+Nail%7CGarvin%7CSeabird&rvprop=comment%7Ccontentmodel%7Cflags%7Cids%7Cparsedcomment%7Csha1%7Csize%7Ctags%7Ctimestamp%7Cuser%7Cuserid%7Ccontent%7Croles&meta=userinfo&uiprop=blockinfo%7Chasmsg&maxlag=5&format=json'
2024-02-19 11:02:37 _requests.py, 660 in _get_request_params: DEBUG API request to dragonsdogma:en (uses get: False):
Headers: {'Content-Type': 'application/x-www-form-urlencoded'}
URI: '/api.php'
Body: 'prop=revisions%7Cinfo%7Ccategoryinfo%7Ctemplates%7Clanglinks%7Cpageprops&action=query&indexpageids=&continue=&tllimit=5000&lllimit=5000&rvslots=%2A&titles=Phantasm%7CEsperaunce%7CPhantom%7CSkeleton%7CSkeleton+Brute%7CBarn%7CEstevon%7CStilettos%7CGolden+Stilettos%7CAneled+Stilettos%7CStage+6%7CPost-Game%7CStage+1%7CA+Soldier%27s+Survey%7CSerenity+Extract%7CVigor+Extract%7CFalchion%7CSpecter%7CFedel%7CFeste%7CBeast-Steak%7CRotten+Beast-Steak%7CGransys+Flamberge%7CFlavian%7CPoison+Arrow%7COil+Arrow%7CThornflower%7CJasper+Blossom%7CLava+Flower%7CCapeflower%7CNoonflower%7CWindmill+Flower%7CGodsthrone+Blossom%7CGrandblossom%7CWilted+Blossom%7CKept+Wilted+Blossom%7CLoneflower%7C%7CStout+Undead%7CFournival%7CWakestone+Shard%7CFredro%7CFire%7CFont+of+Constitution%7CFont+of+Vigor%7CBlack+Eyeglasses%7CDominion+Claw%7CDevil%27s+Nail%7CGarvin%7CSeabird&rvprop=comment%7Ccontentmodel%7Cflags%7Cids%7Cparsedcomment%7Csha1%7Csize%7Ctags%7Ctimestamp%7Cuser%7Cuserid%7Ccontent%7Croles&meta=userinfo&uiprop=blockinfo%7Chasmsg&maxlag=5&format=json'
2024-02-19 11:02:37 _generators.py, 556 in _get_resultdata: DEBUG PropertyGenerator received ['-1', '23169', '11401', '5924', '3728', '10379', '14276', '56380', '54288', '38125', '4511', '38131', '8826', '2185', '39294', '5125', '37264', '42755', '5141', '6382', '5127', '13315', '4630', '28098', '54233', '6258', '14417', '39695', '20077', '11197', '22782', '2799', '2294', '23395', '7701', '39022', '3099', '25149', '2150', '50690', '3110', '70778', '70981', '3682', '2795', '6256', '25148', '8483', '6250', '12451']; limit=-1
2024-02-19 11:02:37 _generators.py, 556 in _get_resultdata: DEBUG PropertyGenerator received ['-1', '23169', '11401', '5924', '3728', '10379', '14276', '56380', '54288', '38125', '4511', '38131', '8826', '2185', '39294', '5125', '37264', '42755', '5141', '6382', '5127', '13315', '4630', '28098', '54233', '6258', '14417', '39695', '20077', '11197', '22782', '2799', '2294', '23395', '7701', '39022', '3099', '25149', '2150', '50690', '3110', '70778', '70981', '3682', '2795', '6256', '25148', '8483', '6250', '12451']; limit=-1
2024-02-19 11:02:37 _generators.py, 170 in preloadpages: DEBUG Preloading {'title': '', 'invalidreason': 'The requested page title is empty or contains only the name of a namespace.', 'invalid': ''}
2024-02-19 11:02:37 _generators.py, 170 in preloadpages: DEBUG Preloading {'title': '', 'invalidreason': 'The requested page title is empty or contains only the name of a namespace.', 'invalid': ''}
2024-02-19 11:02:37 logging.py, 337 in exception: ERROR [[en:]]: The requested page title is empty or contains only the name of a namespace.
Traceback (most recent call last):
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\scripts\interwiki.py", line 2376, in main
bot.run()
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\scripts\interwiki.py", line 2022, in run
self.queryStep()
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\scripts\interwiki.py", line 1999, in queryStep
self.oneQuery()
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\scripts\interwiki.py", line 1987, in oneQuery
for _ in gen:
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\pywikibot\site\_generators.py", line 197, in preloadpages
api.update_page(page, pagedata, rvgen.props)
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\pywikibot\data\api\_generators.py", line 973, in update_page
_update_pageid(page, pagedict)
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\pywikibot\data\api\_generators.py", line 872, in _update_pageid
raise InvalidTitleError(f"{page}: {pagedict['invalidreason']}")
pywikibot.exceptions.InvalidTitleError: [[en:]]: The requested page title is empty or contains only the name of a namespace.
2024-02-19 11:02:37 logging.py, 337 in exception: ERROR [[en:]]: The requested page title is empty or contains only the name of a namespace.
Traceback (most recent call last):
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\scripts\interwiki.py", line 2376, in main
bot.run()
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\scripts\interwiki.py", line 2022, in run
self.queryStep()
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\scripts\interwiki.py", line 1999, in queryStep
self.oneQuery()
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\scripts\interwiki.py", line 1987, in oneQuery
for _ in gen:
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\pywikibot\site\_generators.py", line 197, in preloadpages
api.update_page(page, pagedata, rvgen.props)
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\pywikibot\data\api\_generators.py", line 973, in update_page
_update_pageid(page, pagedict)
File "E:\install\wiki\pywikibot\Pywikibot 8.6.0\pywikibot\data\api\_generators.py", line 872, in _update_pageid
raise InvalidTitleError(f"{page}: {pagedict['invalidreason']}")
pywikibot.exceptions.InvalidTitleError: [[en:]]: The requested page title is empty or contains only the name of a namespace.
2024-02-19 11:02:37 __init__.py, 347 in _flush: DEBUG _flush() called
2024-02-19 11:02:37 __init__.py, 347 in _flush: DEBUG _flush() called
2024-02-19 11:02:37 __init__.py, 397 in _flush: VERBOSE Dropped throttle(s).
2024-02-19 11:02:37 __init__.py, 397 in _flush: VERBOSE Dropped throttle(s).
2024-02-19 11:02:37 http.py, 119 in flush: VERBOSE Closing network session.
2024-02-19 11:02:37 http.py, 119 in flush: VERBOSE Closing network session.
After upgrading to MW 1.40, trying to login via "python pwb.py login" ends
up in an error message:
writeapidenied, you're not allowed to edit this Wiki through the API
I'm logging in using Bot Passwords. LocalSettings.php has writeapi group
right enabled for bot users. Previously, this has worked. What am I doing
wrong? Should I use OAuth to gain editing rights?
Hi Pywikibot people,
As you might know, the Toolforge admins are planning to deprecate the Grid
Engine <https://wikitech.wikimedia.org/wiki/Obsolete:Toolforge/Grid> and
replace it with Kubernetes
<https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes>.
Previously, there was a "shared Pywikibot install" maintained via the pywikibot
tool <https://toolsadmin.wikimedia.org/tools/id/pywikibot> that made it
relatively easy to run any scripts included in Pywikibot itself via the
grid engine.
It's not possible to replicate that setup on Kubernetes, but we have come
up with an alternative which is a custom image built using the build service
<https://wikitech.wikimedia.org/wiki/Help:Toolforge/Build_Service> that all
tools can use. The process to build that image essentially involves taking
the Pywikibot git repo and adding some configuration files on top of it
<https://gitlab.wikimedia.org/taavi/pywikibot-script-buildservice/-/commits/…>
(the location of that repository is not final). There's some documentation
on what it will look like to users on Wikitech
<https://wikitech.wikimedia.org/wiki/User:Majavah/Pywikibot>.
I have two questions for you regarding this:
1. Are any of you interested in helping maintain the image? If not, that's
fine, this image will be supported by the Toolforge admins and the Cloud
Services team anyways.
2. Is it fine to use the pywikibot tool account
<https://toolsadmin.wikimedia.org/tools/id/pywikibot> for building the
image? The tool account name is visible in the user-facing image name,
which is why I think it'd be nicer to use that instead of making a new
account for the image build specifically.
thanks,
Taavi
--
Taavi Väänänen (he/him)
Site Reliability Engineer, Cloud Services
Wikimedia Foundation
Hello, I'm trying to run python pwb.py replace -fix:ComboLists
-file:PageList.txt in command prompt.
ComboLists is a new fix I wrote into user_fixes.py that finds a specific
template on the page and replaces its content with more up to date
information
The new information to be added is generated by another script I wrote.
There is no way around it, my template generator must take the page's title
as an input.
So my current solution is for the generator to also iterate through the
exact same page list found in PageList.txt
As long as every page on the list is being edited, everything works fine,
but things break if there is any page on the list that does not require
editing and replace.py skips over it so the two functions will no longer be
working in sync.
I'd like to know if there is any way to directly figure out what page the
replace.py is currently viewing and use it as an input for my script
written in user_fixes.py
Thank you.
Dear Pywikibot developers,
I am a Pywikibot user interested in creating a Conda package for Pywikibot.
With your permission and guidance, I would like to contribute to the
Pywikibot Conda package effort.
A Conda package for Pywikibot would provide several advantages over the
existing pip package. Conda offers better management of dependencies,
allowing for isolated environments and easy installation. It caters to
users who prefer Conda as their package manager and facilitates integration
with Conda-based workflows and tools.
I kindly request your permission to proceed with creating the Conda package
and would greatly appreciate your guidance throughout the process. Once
complete, I will share the package link for your review and feedback.
Thank you for considering my request. I look forward to your response.
Mahfuza
LinkedIn <https://www.linkedin.com/in/mhmohona/> | GIthub
<https://github.com/mhmohona> | Phabricator
<https://phabricator.wikimedia.org/p/Mhmohona/>
Dear Pywikibot Team,
I hope this message finds you well. My name is Adnan, and I'm an aspiring
software developer with a background in teaching and a passion for coding.
I've been honing my skills in Python, Flask, HTML, CSS, JavaScript, and
MySQL, and I recently completed a personal project using Flask.
I'm eager to take my skills to the next level by contributing to open
source projects, particularly Pywikibot, which I find fascinating. Before I
dive in, I wanted to inquire if the Pywikibot maintainers are open to new
contributors, and if there are specific areas or tasks that need attention.
I'm dedicated, willing to learn, and excited about the prospect of
contributing to such a valuable project. If there are any guidelines or
resources you could provide to help me get started, I would greatly
appreciate it.
Thank you for your time and consideration. I look forward to your response.
Best regards,
Adnan