Page MenuHomePhabricator

add_to_mediawiki/remove_from_mediawiki errors on files with no first section
Closed, ResolvedPublic

Description

Saw this error in add_to_mediawiki too.

File name: File:Wikibooks-logo-li.svg"

Traceback (most recent call last):
  File "/var/www/tracker.wikimedia.cz/deploy/pyenv/lib/python2.7/site-packages/background_task/tasks.py", line 43, in bg_runner
    func(*args, **kwargs)
  File "/var/www/tracker.wikimedia.cz/trackersite/tracker/models.py", line 843, in remove_from_mediawiki
    mw.put_content(media_name, MediaInfo.strip_template(mw.get_content(media_name, rvsection=1)), section=1)
  File "/var/www/tracker.wikimedia.cz/trackersite/socialauth/api.py", line 63, in get_content
    return data[data.keys()[0]]["revisions"][0]["slots"][rvslot]["*"]
KeyError: '*'

Details

Related Gerrit Patches:

Event Timeline

Urbanecm created this task.Jan 8 2019, 1:56 PM
Urbanecm moved this task from Inbox to Bugs on the WMCZ-Tracker board.

That's because File:Wikibooks-logo-li.svg doesn't have "first section" we try to get in add_to_mediawiki/remove_from_mediawiki. We should probably switch to "Put directly under Information template" principle instead of "put at the end of the first section".

Urbanecm renamed this task from remove_from_mediawiki errored to add_to_mediawiki/remove_from_mediawiki errors on files with no first section.Jan 18 2019, 6:56 PM
Urbanecm triaged this task as Normal priority.
Majavah claimed this task.Jun 26 2019, 6:32 PM
Majavah added a subscriber: Majavah.

Change 519639 had a related patch set uploaded (by Majavah; owner: Majavah):
[wikimedia-cz/tracker@master] Append template directly under info template

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

Change 519639 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Append template directly under info template

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

Urbanecm closed this task as Resolved.Jul 12 2019, 3:08 PM