Last modified: 2014-11-15 00:12:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T75214, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 73214 - only one namespace permitted
only one namespace permitted
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
pagegenerators (Other open bugs)
core-(2.0)
All All
: Unprioritized major
: ---
Assigned To: Pywikipedia bugs
:
: 73415 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-10 08:18 UTC by JAn Dudík
Modified: 2014-11-15 00:12 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description JAn Dudík 2014-11-10 08:18:32 UTC
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.
Comment 1 se4598 2014-11-13 21:26:26 UTC
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.
Comment 2 Mpaa 2014-11-13 22:04:51 UTC
Patch https://gerrit.wikimedia.org/r/#/c/173113/
Comment 3 Mpaa 2014-11-14 22:33:14 UTC
Patch https://gerrit.wikimedia.org/r/#/c/173113/ merged.
Comment 4 se4598 2014-11-14 23:25:06 UTC
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
Comment 5 Gerrit Notification Bot 2014-11-15 00:06:29 UTC
Change 173465 had a related patch set uploaded by Mpaa:
allpages.py: fix namespace param type

https://gerrit.wikimedia.org/r/173465
Comment 6 Mpaa 2014-11-15 00:06:57 UTC
*** Bug 73415 has been marked as a duplicate of this bug. ***
Comment 7 Gerrit Notification Bot 2014-11-15 00:10:55 UTC
Change 173465 merged by jenkins-bot:
allpages.py: fix namespace param type

https://gerrit.wikimedia.org/r/173465
Comment 8 se4598 2014-11-15 00:12:08 UTC
Thanks for the quick fix, works for me.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links