jayvdb triaged this task as "Low" priority.
jayvdb added a comment.

It is also a Bad Title on 1.17 : http://botwiki.sno.cc/wiki/Talk:Project:Foo .

`Talk:WP:AJ/Transcription` is on my watchlist because 'WP' was not a namespace 
until it was added to the namespace aliases, reasonably recently (2011?).  
Adding the alias, and subsequent MW upgrades have not updated the raw watchlist 
lists of users, and Pywikibot obviously should not crash when it encounters old 
bad titles in the raw watchlist.  But it probably a rare scenario, so low 
priority.

I see two possible approaches:

1. watchlist.py catches this error, and presents the user with a useful message 
to show them how to fix the problem.  Either informing the user to edit the 
watchlist onwiki, or watchlist.py could add a mode '-clean' which removes the 
problematic entry from the raw watchlist, and repeats the fetch/clean cycle 
until a fetch does not raise an exception.
2. Add a flag is added to APISite.watched_pages to continue generating after 
encountering an invalid title.  As this is inside the QueryGenerator, it will 
requiring adding this functionality for all generators.  This could be very 
useful if there are other API results which could contain invalid titles.
3. watchlist.py catches this error, issues a warning, and restarts 
APISite.watched_pages from after the invalid title using `wrfromtitle`.  This 
approach is a quick fix for watchlist only, but this is reasonable if 
watchlistraw is the only problematic case.

Regarding option 2, the only generic way to make pywikibot fails inside 
QueryGenerator, that I can think of, is:

1. fetch a list of titles from a list where pages are frequently deleted, e.g. 
en.wp newpages
2. delete one of those pages
3. use APISite.preloadpages to iterate over the pages including the deleted page

Unfortunately, that is how PreloadingGenerator works, as a consequence of 
supporting multiple sites.


TASK DETAIL
  https://phabricator.wikimedia.org/T106954

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: jayvdb
Cc: XZise, Aklapper, jayvdb, pywikibot-bugs-list, Malyacko, P.Copp



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to