Page MenuHomePhabricator

ErfgoedBot missing_commonscat_links crashes with 'NoneType' object is not iterable
Closed, ResolvedPublic


Spotted in the logs:

2017-09-02_10:34:31 Make a list of missing commonscat links...
Page [[de:Benutzer:ErfgoedBot/Denkmal Österreich missing commons category links]] saved
Page [[cs:Wikipedie:WikiProjekt Wiki Loves Monuments/Missing commons category links]] saved
Page [[en:Wikipedia:WikiProject National Register of Historic Places/Missing commons category links]] saved
Page [[pl:Wikiprojekt:Wiki Lubi Zabytki/Missing commonscat links]] saved
Page [[en:Wikipedia:WikiProject Historic sites/Missing commons category links for listed buildings in England]] saved
Page [[Wikipedia:Wikiproject/Erfgoed/Nederlandse Erfgoed Inventarisatie/Missende commonscat links]] saved
Traceback (most recent call last):
  File "/data/project/heritage/pywikibot/", line 263, in <module>
    if not main():
  File "/data/project/heritage/pywikibot/", line 257, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "/data/project/heritage/pywikibot/", line 121, in run_python_file
  File "/data/project/heritage/erfgoedbot/", line 246, in <module>
  File "/data/project/heritage/erfgoedbot/", line 239, in main
    countrycode, lang, countryconfig, conn, cursor, conn2, cursor2)
  File "/data/project/heritage/erfgoedbot/", line 36, in processCountry
    commonscatField = lookupSourceField(u'commonscat', countryconfig)
  File "/data/project/heritage/erfgoedbot/", line 115, in lookupSourceField
    for field in countryconfig.get('fields'):
TypeError: 'NoneType' object is not iterable
CRITICAL: Closing network session.
<type 'exceptions.TypeError'>

Event Timeline

Change 378886 had a related patch set uploaded (by Jean-Frédéric; owner: Jean-Frédéric):
[labs/tools/heritage@master] Skip SPARQL type in

Change 378886 merged by jenkins-bot:
[labs/tools/heritage@master] Skip SPARQL type in

JeanFred claimed this task.