https://bugzilla.wikimedia.org/show_bug.cgi?id=72093
Bug ID: 72093 Summary: commands with colon fails Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: critical Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jan.dudik@gmail.com Web browser: --- Mobile Platform: ---
When running script with pagegenerators containing character ":", bot fails:
I:\py\rewrite>pwb.py newitem -catr:údržba_Wikipedie Retrieving 50 pages from wikipedia:cs.
Wikipedie:Požadované články <<<
[[cs:Wikipedie:Požadované články]] already has an item: [[wikidata:Q4664111]]. ...
I:\py\rewrite>pwb.py newitem -catr:údržba:Wikidata Traceback (most recent call last): File "I:\py\rewrite\pwb.py", line 164, in <module> run_python_file(fn, argv, argvu) File "I:\py\rewrite\pwb.py", line 69, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "I:\py\rewrite\scripts\newitem.py", line 149, in <module> main() File "I:\py\rewrite\scripts\newitem.py", line 135, in main elif gen.handleArg(arg): File "I:\py\rewrite\pywikibot\pagegenerators.py", line 415, in handleArg gen = self.getCategoryGen(arg, len('-catr'), recurse=True) File "I:\py\rewrite\pywikibot\pagegenerators.py", line 283, in getCategoryGen defaultNamespace=14)) File "I:\py\rewrite\pywikibot\tools.py", line 529, in wrapper return obj(*__args, **__kw) File "I:\py\rewrite\pywikibot\page.py", line 1951, in __init__ if self.namespace() != 14: File "I:\py\rewrite\pywikibot\page.py", line 158, in namespace return self._link.namespace File "I:\py\rewrite\pywikibot\page.py", line 4141, in namespace self.parse() File "I:\py\rewrite\pywikibot\page.py", line 4050, in parse newsite = self._site.interwiki(prefix) File "I:\py\rewrite\pywikibot\site.py", line 600, in interwiki "'{0}' is not an interwiki prefix.".format(prefix)) UnicodeEncodeError: 'ascii' codec can't encode character u'\xfa' in position 0: ordinal not in range(128) <type 'exceptions.UnicodeEncodeError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
I:\py\rewrite>
https://bugzilla.wikimedia.org/show_bug.cgi?id=72093
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mpaa.wiki@gmail.com
--- Comment #1 from Mpaa mpaa.wiki@gmail.com --- The workaround is to use Kategorie.
python pwb.py newitem -catr:Kategorie:údržba:Wikidata -lang:cs -simulate
https://bugzilla.wikimedia.org/show_bug.cgi?id=72093
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 166897 had a related patch set uploaded by XZise: [FIX] Site: Use unicode for errors with iw prefix
https://gerrit.wikimedia.org/r/166897
https://bugzilla.wikimedia.org/show_bug.cgi?id=72093
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=72093
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 166903 had a related patch set uploaded by Mpaa: Bug 72093 - commands with colon fails
https://gerrit.wikimedia.org/r/166903
https://bugzilla.wikimedia.org/show_bug.cgi?id=72093
--- Comment #4 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 166897 merged by jenkins-bot: [FIX] Site: Use unicode for errors with iw prefix
https://gerrit.wikimedia.org/r/166897
https://bugzilla.wikimedia.org/show_bug.cgi?id=72093
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED CC| |jayvdb@gmail.com Resolution|--- |FIXED
--- Comment #5 from John Mark Vandenberg jayvdb@gmail.com --- This appears to be solved (the command in comment 0 generates pages).
pywikipedia-bugs@lists.wikimedia.org