| CommunityTechBot updated the task description. (Show Details) |
CHANGES TO TASK DESCRIPTION
26570726f6475636520796f757220627567207573696e67206120726563656e742076657273696f6e206f662074686520736f6674776172652c20746f2068652077696b6920636f6e74656e74206c616e67756167652e0a0a5468616e6b20796f752e0a546167730a436865636b557365720ad70a436f6e6e65637465642d4f70656e2d48657269746167652d42617463682d75706c6f61647320285241c42d4b4d425f315f323031372d3032290ad70a54616d696c2d53697465730ad70a47616d6570726573730ad70a48617368746167730ad70a4a4144450ad70a4b6172746f456469746f720ad70a4c616e67756167652d323031382d4170722d4a756e650ad70a4e65772d456469746f722d457870657269656e6365730ad70a4d61696c0ad70a5443422d5465616d0ad70a53756273637269626572730a4465736372697074696f6e20507265766965770a436f6e74656e77a6f6e652073657474696e6720696e20796f75722070726f66696c652c20636c69636b20746f207265636f6e63696c652e>>! @APerson wrote:
> I'm getting a strange InvalidTitle error while iterating through each of the articles in the English Wikipedia's "Unprintworthy redirects" category using the `articles()` function.
>
> In particular, if you run this code:
> ```lang=python
> import pywikibot
> site = pywikibot.Site("en", "wikipedia"); site.login()
> cat = pywikibot.Category(site, "Category:Unprintworthy redirects")
> for each_article in cat.articles(namespaces=(0)):
> print(each_article.title(withNamespace=True), each_article.pageid)
> ```
> Then it'll run for a while, printing out a bunch of titles and page IDs, and then crash:
> ```
> Traceback (most recent call last):
> File "/data/project/apersonbot/test-redir-bann.py", line 5, in <module>
> print(each_article.title(withNamespace=True), each_article.pageid)
> File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1446,
> in wrapper
> return obj(*__args, **__kw)
> File "/shared/pywikipedia/core/pywikibot/page.py", line 322, in title
> title = self._link.canonical_title()
> File "/shared/pywikipedia/core/pywikibot/page.py", line 5737, in
> canonical_title
> if self.namespace != Namespace.MAIN:
> File "/shared/pywikipedia/core/pywikibot/page.py", line 5698, in namespace
> self.parse()
> File "/shared/pywikipedia/core/pywikibot/page.py", line 5669, in parse
> raise pywikibot.InvalidTitle("The link does not contain a page "
> pywikibot.exceptions.InvalidTitle: The link does not contain a page title
> CRITICAL: Closing network session.
> ```
> Any ideas? I don't think this is expected behavior, but I could be wrong.
> I'm getting a strange InvalidTitle error while iterating through each of the articles in the English Wikipedia's "Unprintworthy redirects" category using the `articles()` function.
>
> In particular, if you run this code:
> ```lang=python
> import pywikibot
> site = pywikibot.Site("en", "wikipedia"); site.login()
> cat = pywikibot.Category(site, "Category:Unprintworthy redirects")
> for each_article in cat.articles(namespaces=(0)):
> print(each_article.title(withNamespace=True), each_article.pageid)
> ```
> Then it'll run for a while, printing out a bunch of titles and page IDs, and then crash:
> ```
> Traceback (most recent call last):
> File "/data/project/apersonbot/test-redir-bann.py", line 5, in <module>
> print(each_article.title(withNamespace=True), each_article.pageid)
> File "/shared/pywikipedia/core/pywikibot/tools/__init__.py", line 1446,
> in wrapper
> return obj(*__args, **__kw)
> File "/shared/pywikipedia/core/pywikibot/page.py", line 322, in title
> title = self._link.canonical_title()
> File "/shared/pywikipedia/core/pywikibot/page.py", line 5737, in
> canonical_title
> if self.namespace != Namespace.MAIN:
> File "/shared/pywikipedia/core/pywikibot/page.py", line 5698, in namespace
> self.parse()
> File "/shared/pywikipedia/core/pywikibot/page.py", line 5669, in parse
> raise pywikibot.InvalidTitle("The link does not contain a page "
> pywikibot.exceptions.InvalidTitle: The link does not contain a page title
> CRITICAL: Closing network session.
> ```
> Any ideas? I don't think this is expected behavior, but I could be wrong.
TASK DETAIL
EMAIL PREFERENCES
To: CommunityTechBot
Cc: Dvorapa, zhuyifei1999, pywikibot-bugs-list, Xqt, JJMC89, APerson, AndyTan, Zylc, Asad_Ali_Palijo, 1978Gage2001, Lahi, herron, Soteriaspace, RazeSoldier, Jayprakash12345, Chicocvenancio, alanajjar, JakeTheDeveloper, Magul, Tbscho, MayS, Zoranzoki21, Lea_WMDE, Mattias_Ostmar-WMSE, Mdupont, TerraCodes, Jseddon, Ryuch, Mkdw, RuyP, Avicennasis, JEumerus, MuhammadShuaib, Trizek-WMF, KasiaWMDE, 0x010C, srodlund, Luke081515, grin, SimmeD, Bsadowski1, mys_721tx, Snowolf, Huji, Gryllida, jayvdb, Dalba, Tobi_WMDE_SW, Masti, revi, scfc, Alchimista, He7d3r, Romaine, Mbch331, Rxy, Jay8g, Glaisher, Krenair, chasemp
Cc: Dvorapa, zhuyifei1999, pywikibot-bugs-list, Xqt, JJMC89, APerson, AndyTan, Zylc, Asad_Ali_Palijo, 1978Gage2001, Lahi, herron, Soteriaspace, RazeSoldier, Jayprakash12345, Chicocvenancio, alanajjar, JakeTheDeveloper, Magul, Tbscho, MayS, Zoranzoki21, Lea_WMDE, Mattias_Ostmar-WMSE, Mdupont, TerraCodes, Jseddon, Ryuch, Mkdw, RuyP, Avicennasis, JEumerus, MuhammadShuaib, Trizek-WMF, KasiaWMDE, 0x010C, srodlund, Luke081515, grin, SimmeD, Bsadowski1, mys_721tx, Snowolf, Huji, Gryllida, jayvdb, Dalba, Tobi_WMDE_SW, Masti, revi, scfc, Alchimista, He7d3r, Romaine, Mbch331, Rxy, Jay8g, Glaisher, Krenair, chasemp
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
