https://bugzilla.wikimedia.org/show_bug.cgi?id=69060
Bug ID: 69060 Summary: makecat does not work with command line arguments Product: Pywikibot Version: core (2.0) Hardware: PC OS: Linux Status: NEW Severity: major Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jayvdb@gmail.com Web browser: --- Mobile Platform: ---
When the category name is put on the command line in Linux
$ python pwb.py scripts/makecat.py -family:wikipedia -lang:en Roads_in_Kent Traceback (most recent call last): File "pwb.py", line 157, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 67, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "scripts/makecat.py", line 217, in <module> workingcatname = unicode(workingcatname, 'utf-8') TypeError: decoding Unicode is not supported <type 'exceptions.TypeError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
It works correctly if the category name is entered via pywikibot.input()
$ python pwb.py scripts/makecat.py -family:wikipedia -lang:en Which page to start with? Roads_in_Kent WARNING: unicode.setAction is DEPRECATED, use comment parameter for page saving method instead. Retrieving 32 pages from wikipedia:en. Retrieving 50 pages from wikipedia:en.
==Roy Phippen== ....
https://bugzilla.wikimedia.org/show_bug.cgi?id=69060
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |crangasi2001@yahoo.com
--- Comment #1 from John Mark Vandenberg jayvdb@gmail.com --- Im guessing the 'unicode(workingcatname, 'utf-8')' was put in there for a reason; probably some other issue wrt pywikibot.input or command line argument handling.
https://bugzilla.wikimedia.org/show_bug.cgi?id=69060
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
--- Comment #2 from John Mark Vandenberg jayvdb@gmail.com --- I see it wasnt using pywikibot.input, which is why casting to unicode was needed.
https://gerrit.wikimedia.org/r/#/c/151375/3
https://bugzilla.wikimedia.org/show_bug.cgi?id=69060
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=69060
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |69069
pywikipedia-bugs@lists.wikimedia.org