Page MenuHomePhabricator

WikiApiary: audit-bee.py is broken
Open, Needs TriagePublic

Description

Audit bee is having trouble. Example run:

$ sudo su wikibot sh -c "(cd ~/wikibots/WikiApiary/audit-bee; nice -n 19 ./audit-bee.py --site 246561 -vvvv -d )"
Username: Audit Bee Password: ----
True
Query: [[Concept:Websites never audited]]|?Has ID|?Has API URL|?Check every|?Collect general data|?Collect extension data|?Collect skin data|?Collect statistics|?Collect semantic statistics|?Collect statistics stats|?Collect logs|?Collect recent changes|?Creation date|?Is audited|?Is active|sort=Creation date|order=rand|limit=20
Adding Starcade Wiki.
Adding Lilith's Throne Wiki (lilithstrone.com).
Adding Wikibase Registry.
Adding Fanonpedia (zh).
Adding NSindex.
Adding Fanonversity.
Adding Campaign Lab.
Adding Fanonsource.
Adding Eamon Wiki.
Adding Lê Duy Quang's personal wiki.
Adding Biblioteca ficticia.
Adding IMT:HilfeWiki.
Adding Fanonquote.
Adding MindMapTools.
Adding WAGS GenWiki.
Adding Hidden Palace.
Adding Ames.
Adding MH370 Wiki.
Adding AureoWiki.
Adding Internet Movie Plane Database.


Site:  {'Collect logs': False, 'Collect statistics stats': False, 'Collect recent changes': False, 'Has ID': 269766, 'Creation date': {'timestamp': '1537087023', 'raw': '1/2018/9/16/8/37/3/0'}, 'Collect semantic usage': False, 'Collect semantic statistics': False, 'Collect skin data': True, 'Is active': True, 'Has API URL': 'https://starcade.gamepedia.com/api.php', 'Check every': 240, 'Collect statistics': True, 'pagename': 'Starcade Wiki', 'Collect extension data': True, 'Collect general data': True, 'Has statistics URL': None, 'fullurl': 'https://wikiapiary.com/wiki/Starcade_Wiki', 'Is audited': False}
Pulling general info info from https://starcade.gamepedia.com/api.php?action=query&meta=siteinfo&siprop=general&format=json.
Website: Starcade Wiki  Generator: MediaWiki 1.31.1  Major: 1  Minor: 31
Pulling extension info info from https://starcade.gamepedia.com/api.php?action=query&meta=siteinfo&siprop=extensions&format=json.
Query: [[Starcade Wiki]]|?Founded date
Response: {'query': {'serializer': 'SMW\\Serializers\\QueryResultSerializer', 'version': 2, 'meta': {'count': 1, 'source': u'', 'time': '0.001133', 'hash': '047daa45cb75685f46d43c3541f6a05e', 'offset': 0}, 'results': {'Starcade Wiki': {'fulltext': 'Starcade Wiki', 'displaytitle': u'', 'exists': '1', 'namespace': 0, 'printouts': {'Founded date': []}, 'fullurl': 'https://wikiapiary.com/wiki/Starcade_Wiki'}}, 'printrequests': [{'typeid': '_wpg', 'redi': u'', 'mode': 2, 'key': u'', 'label': u''}, {'typeid': '_dat', 'format': u'', 'label': 'Founded date', 'mode': 1, 'key': 'Founded_date', 'redi': u''}]}}
Starcade Wiki setting Founded date to 2017/12/22 03:50:01 PM (Setting founded date to timestamp of first edit).
{'redirect': 'https://wikiapiary.com/wiki/Starcade_Wiki', 'status': 200, 'responseText': 'Modified <a href="/wiki/Starcade_Wiki" title="Starcade Wiki">Starcade Wiki</a> using form Website.', 'target': 'Starcade Wiki', 'form': {'title': 'Website'}, 'warnings': {'main': {'*': 'Unrecognized parameters: wpSummary, Website.'}}}
Starcade Wiki audit completed, updating audit date.
{'redirect': 'https://wikiapiary.com/wiki/Starcade_Wiki', 'status': 200, 'responseText': 'Modified <a href="/wiki/Starcade_Wiki" title="Starcade Wiki">Starcade Wiki</a> using form Website.', 'target': 'Starcade Wiki', 'form': {'title': 'Website'}, 'warnings': {'main': {'*': 'Unrecognized parameters: Website, wpSummary.'}}}


Site:  {'Collect logs': False, 'Collect statistics stats': False, 'Collect recent changes': False, 'Has ID': 253257, 'Creation date': {'timestamp': '1520125625', 'raw': '1/2018/3/4/1/7/5/0'}, 'Collect semantic usage': False, 'Collect semantic statistics': False, 'Collect skin data': True, 'Is active': False, 'Has API URL': None, 'Check every': 240, 'Collect statistics': True, 'pagename': "Lilith's Throne Wiki (lilithstrone.com)", 'Collect extension data': True, 'Collect general data': True, 'Has statistics URL': None, 'fullurl': 'https://wikiapiary.com/wiki/Lilith%27s_Throne_Wiki_(lilithstrone.com)', 'Is audited': False}
Traceback (most recent call last):
  File "./audit-bee.py", line 496, in <module>
    bee.main()
  File "./audit-bee.py", line 466, in main
    log_bot='Audit Bee'
  File "../lib/apiary.py", line 176, in record_error
    print "New log message for %s" % site['pagename']
TypeError: 'NoneType' object has no attribute '__getitem__'

Note that the -d parameter was ignored, the --site parameter was ignored, several warnings appeared in the responses, and more

Event Timeline

Kghbln added a subscriber: Kghbln.May 23 2019, 2:24 PM

Just realized that the bot scrapped off: https://wikiapiary.com/wiki/Special:Contributions/Audit_Bee Thumbs up for a fix.

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMay 23 2019, 2:24 PM