Xqt created this task. Xqt added a subscriber: Xqt. Xqt added a project: pywikibot-core. Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION ISBN.py wrongly breaks while formatting the ISBN.
command line was:
``` pwb.py isbn -page:Franz-Eher-Verlag -Format -lang:de -simulate ``` The ISBN is ISBN 3-00-013343-7 which is correct and exists [1]. But the script fails. [1] https://portal.dnb.de/opac.htm?referrer=Wikipedia&method=enhancedSearch&...
``` Traceback (most recent call last): File "C:\pwb\SVN\core\pwb.py", line 228, in <module> run_python_file(filename, argv, argvu, file_package) File "C:\pwb\SVN\core\pwb.py", line 85, in run_python_file main_mod.__dict__) File ".\scripts\isbn.py", line 1662, in <module> main() File ".\scripts\isbn.py", line 1657, in main bot.run() File ".\scripts\isbn.py", line 1526, in run self.treat(page) File ".\scripts\isbn.py", line 1504, in treat new_text = self.isbnR.sub(_hyphenateIsbnNumber, new_text) File ".\scripts\isbn.py", line 1415, in _hyphenateIsbnNumber i.format() File ".\scripts\isbn.py", line 1334, in format ISBN.format(self) File ".\scripts\isbn.py", line 1225, in format % self.code) __main__.InvalidIsbnException: ISBN 3-00-013343-7: publisher number unknown. <class '__main__.InvalidIsbnException'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort ```
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt Cc: pywikipedia-bugs, Xqt, Aklapper, jayvdb
Xqt edited the task description. Xqt set Security to None.
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt Cc: pywikipedia-bugs, Xqt, Aklapper, jayvdb
jayvdb edited the task description.
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: pywikipedia-bugs, Xqt, Aklapper, jayvdb
XZise added a subscriber: XZise. XZise added a comment.
Should we fix that or suggest the user to install an external library?
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: XZise, Xqt, Aklapper, jayvdb, pywikipedia-bugs
jayvdb added a subscriber: jayvdb. jayvdb added a project: pywikibot-compat. jayvdb added a comment.
The internal data tables in isbn.py are extremely outdated / poor quality.
In core, you can install external ISBN libraries stdnum , isbnlib or isbn_hyphenate , which were added in https://phabricator.wikimedia.org/T85240. They will be used instead of the internal data in isbn.py
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
jayvdb added a comment.
In https://phabricator.wikimedia.org/T97887#1254348, @XZise wrote:
Should we fix that or suggest the user to install an external library?
Add a warn() when no other library found?
and treat() should also catch these exceptions. (and run looks like it should override Bot.run)
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
Xqt added a comment.
This bug does not come from an outdated table. The table is right for the given ISBN.
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt Cc: jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
jayvdb added a comment.
if rest[:length] > start and rest[:length] <= end:
probably should be
if rest[:length] >= start and rest[:length] <= end:
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
Xqt added a comment.
I had the same thought
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt Cc: jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
Xqt claimed this task.
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt Cc: jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
gerritbot added a subscriber: gerritbot. gerritbot added a comment.
Change 208376 had a related patch set uploaded (by Xqt): [bugfix] Fix ISBN formatting
https://gerrit.wikimedia.org/r/208376
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, gerritbot Cc: gerritbot, jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
gerritbot added a project: Patch-For-Review.
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, gerritbot Cc: gerritbot, jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
gerritbot added a comment.
Change 208377 had a related patch set uploaded (by Xqt): [bugfix] Fix ISBN formatting
https://gerrit.wikimedia.org/r/208377
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, gerritbot Cc: gerritbot, jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
gerritbot added a comment.
Change 208376 merged by jenkins-bot: [bugfix] Fix ISBN formating
https://gerrit.wikimedia.org/r/208376
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, gerritbot Cc: gerritbot, jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
gerritbot added a comment.
Change 208377 merged by jenkins-bot: [bugfix] Fix ISBN formatting
https://gerrit.wikimedia.org/r/208377
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, gerritbot Cc: gerritbot, jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
Xqt closed this task as "Resolved".
TASK DETAIL https://phabricator.wikimedia.org/T97887
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt Cc: gerritbot, jayvdb, XZise, Xqt, Aklapper, Anshoe, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org