Page MenuHomePhabricator

Tag detection is broken
Closed, ResolvedPublic

Description

2017-06-03 14:11:27,387 - wikibugs.wb2-phab - ERROR - Could not retrieve tags for OrderedDict([('PHID-XACT-TASK-4virr3rf4nt6ejr', 'PHID-XACT-TASK-4virr3rf4nt6ejr'), ('PHID-XACT-TASK-qtu6wfadj5vsecx', 'PHID-XACT-TASK-qtu6wfadj5vsecx')])
Traceback (most recent call last):

File "/data/project/wikibugs/wikibugs2/wikibugs.py", line 236, in process_event
  projects = self.get_tags(task_page)
File "/data/project/wikibugs/wikibugs2/wikibugs.py", line 152, in get_tags
  shade = [cls.split("-")[3] for cls in classes if cls.startswith("phui-tag-shade-")][0]

IndexError: list index out of range

Event Timeline

Changed [cls.split("-")[3] for cls in classes if cls.startswith("phui-tag-shade-")][0] to [cls.split("-")[-1] for cls in classes if cls.startswith("phui-tag-shade")][0] to support tags that are simply 'phui-tag-shade'. From what I can see, there is no way yet to do this cleanly/easily via the API.

valhallasw claimed this task.

I think this broke the color detection. As of last few days, all tags are blue on IRC regardless of the tag's actual color.

Screen Shot 2017-06-05 at 20.26.19.png (1,984×314 px, 190 KB)

Screen Shot 2017-06-05 at 20.26.34.png (456×222 px, 28 KB)
Screen Shot 2017-06-05 at 20.26.38.png (542×320 px, 38 KB)

Unassigning; if anyone wants to pick this up they are more than welcome, but it's not on my radar to fix.

• bd808 assigned this task to valhallasw.
• bd808 subscribed.

I split T357828: All phabricator tags emitted with blue color into it's own bug report. That regression may have started with the fix @valhallasw made for the parse error, but it i very much it's own problem at this point.