https://bugzilla.wikimedia.org/show_bug.cgi?id=56734
--- Comment #1 from Igor Betxí coet.cawiki@gmail.com --- I assert that "" is the unique solution and it's right because the last function keep all links related with wikipedias, and doesn't expect a commons link.
getSite(code.replace('wiki','').replace('_', '-'), fam='wikipedia')
if "commons" appears in this function it raise a NoSuchSite error because language family does not exist.
I have evaluate the following results: https://www.wikidata.org/w/api.php?action=query&format=jsonfm&prop=r... and I watch that commons link and wikivoyage links are included in the content. That means that it's necessary to exclude "commons" and "voyage" links to avoid other raise errors.
So I purpose the following change for the line 4719 of the file wikipedia.py: links[code]['name']) for code in links if "commons" not in code and "voyage" not in code]