https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
Bug ID: 73214 Summary: only one namespace permitted Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: major Priority: Unprioritized Component: pagegenerators Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jan.dudik@gmail.com Web browser: --- Mobile Platform: ---
Some weekend changes made interwiki bot unusable:
D:\Py\rewrite>pwb.py interwiki -async -family:wiktionary -cleanup -start:Kategorie:Isla -array:50 -query:30 -untranslated
Traceback (most recent call last): File "D:\Py\rewrite\pwb.py", line 181, in <module> run_python_file(fn, argv, argvu) File "D:\Py\rewrite\pwb.py", line 75, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "D:\Py\rewrite\scripts\interwiki.py", line 2646, in <module> main() File "D:\Py\rewrite\scripts\interwiki.py", line 2537, in main if not genFactory.handleArg(arg): File "D:\Py\rewrite\pywikibot\pagegenerators.py", line 523, in handleArg site=self.site) File "D:\Py\rewrite\pywikibot\pagegenerators.py", line 633, in AllpagesPageGen erator content=content) File "D:\Py\rewrite\pywikibot\tools.py", line 647, in wrapper return obj(*__args, **__kw) File "D:\Py\rewrite\pywikibot\site.py", line 3050, in allpages raise Error("allpages: only one namespace permitted.") pywikibot.exceptions.Error: allpages: only one namespace permitted. <class 'pywikibot.exceptions.Error'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
I use the same command as last week, there is only one namespace, but does not work.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
se4598 se4598@se4598.eu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |se4598@se4598.eu
--- Comment #1 from se4598 se4598@se4598.eu --- I use PrefixingPageGenerator("Module:Abc/", None, True, site=self.site) and have the same problem. suppling an explicit namespace int here (second param) works around that.
I think the if-clause checking for the type and raising the exception is outdated. I read somewhere that the namespace is now an object at some places and not a int anymore.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW CC| |mpaa.wiki@gmail.com
--- Comment #2 from Mpaa mpaa.wiki@gmail.com --- Patch https://gerrit.wikimedia.org/r/#/c/173113/
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
--- Comment #3 from Mpaa mpaa.wiki@gmail.com --- Patch https://gerrit.wikimedia.org/r/#/c/173113/ merged.
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
se4598 se4598@se4598.eu changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |---
--- Comment #4 from se4598 se4598@se4598.eu ---
With this merged I get this exception now: (using gen = PrefixingPageGenerator("Module:Abc/", None, True, site=self.site))
File "[...]\build\Supplier.py", line 289, in <module> Supplier().run(confirmEdit=True, sandbox=sandbox) File "[...]\build\Supplier.py", line 44, in run liste = self.selectWorkOn() File "[...]\build\Supplier.py", line 59, in selectWorkOn for page in gen: File "[...]\build\pywikibot\data\api.py", line 1119, in __iter__ self.data = self.request.submit() File "[...]\build\pywikibot\data\api.py", line 710, in submit raise APIError(code, info, **result["error"]) pywikibot.data.api.APIError: gapunknown_gapnamespace: Unrecognized value for parameter 'gapnamespace': Module: <class 'pywikibot.data.api.APIError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=73415
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 173465 had a related patch set uploaded by Mpaa: allpages.py: fix namespace param type
https://gerrit.wikimedia.org/r/173465
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
--- Comment #6 from Mpaa mpaa.wiki@gmail.com --- *** Bug 73415 has been marked as a duplicate of this bug. ***
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
--- Comment #7 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 173465 merged by jenkins-bot: allpages.py: fix namespace param type
https://gerrit.wikimedia.org/r/173465
https://bugzilla.wikimedia.org/show_bug.cgi?id=73214
se4598 se4598@se4598.eu changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
--- Comment #8 from se4598 se4598@se4598.eu --- Thanks for the quick fix, works for me.
pywikipedia-bugs@lists.wikimedia.org