Page MenuHomePhabricator

clean_sandbox -user fails except on de.wp
Closed, ResolvedPublic

Description

In core only:

$ python pwb.py clean_sandbox -family:wikipedia -lang:en -user
Traceback (most recent call last):
  File "pwb.py", line 222, in <module>
    run_python_file(filename, argv, argvu, file_package)
  File "pwb.py", line 81, in run_python_file
    main_mod.__dict__)
  File "./scripts/clean_sandbox.py", line 339, in <module>
    main()
  File "./scripts/clean_sandbox.py", line 335, in main
    bot = SandboxBot(**opts)
  File "./scripts/clean_sandbox.py", line 184, in __init__
    localSandbox = pywikibot.Page(self.site, localSandboxTitle)
  File "pywikibot/tools.py", line 711, in wrapper
    return obj(*__args, **__kw)
  File "pywikibot/tools.py", line 711, in wrapper
    return obj(*__args, **__kw)
  File "pywikibot/page.py", line 1853, in __init__
    raise ValueError(u'Title must be specified and not empty '
ValueError: Title must be specified and not empty if source is a Site.
<type 'exceptions.ValueError'>

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot-Scripts.
jayvdb subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptJan 27 2015, 4:01 AM
Ladsgroup renamed this task from clean_sandbox -user fails except on de.wp to clean_sandbox -user fails except on en.wp.May 10 2015, 11:06 PM
Ladsgroup set Security to None.
Ladsgroup subscribed.

It happens because no page is defined for English Wikipedia in user_sandboxTemplate variable. (it only contains de.wp)

It would be good if we have a nice error message and then crashing like this.

jayvdb renamed this task from clean_sandbox -user fails except on en.wp to clean_sandbox -user fails except on de.wp.May 11 2015, 7:21 PM

Change 210174 had a related patch set uploaded (by Ladsgroup):
Use pagegenerators for clean_sandbox.py

https://gerrit.wikimedia.org/r/210174

Change 210174 merged by Ladsgroup:
Use pagegenerators for clean_sandbox.py

https://gerrit.wikimedia.org/r/210174

Ladsgroup claimed this task.
Ladsgroup removed a project: Patch-For-Review.