Page MenuHomePhabricator

makecat exception when nothing is entered into first prompt
Closed, ResolvedPublic

Description

If makecat is run without an argument to specify a page name, it will prompt the user for a page name. If the user presses <enter> without entering a value, an exception is raised.

$ python pwb.py scripts/makecat.py -family:wikipedia -lang:en
Which page to start with?

WARNING: unicode.setAction is DEPRECATED, use comment parameter for page saving method instead. 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 228, in <module> workingcatname)) File ".../pywikibot/__init.py", line 432, in wrapper return method(*args, **kw) File ".../pywikibot/page.py", line 1903, in init__ if self.namespace() != 14: File ".../pywikibot/page.py", line 138, in namespace return self._link.namespace File ".../pywikibot/page.py", line 3760, in namespace self.parse() File ".../pywikibot/page.py", line 3737, in parse % self._text) pywikibot.exceptions.Error: Invalid link (no page title): 'Category:' <class 'pywikibot.exceptions.Error'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

Version: core-(2.0)
Severity: normal

Details

Reference
bz69062