Rubin16 created this task. Rubin16 added a subscriber: Rubin16. Rubin16 added a project: pywikibot-core.
TASK DESCRIPTION When I am running reflinks.py, the bot always crashes after the same article https://ru.wikipedia.org/wiki/%D0%90%D0%BB%D0%BB%D0%B5%D1%8F_%D0%93%D0%B5%D1...)
I don't see anything bad in the article and it seems to be a script problem.
Traceback:
No changes were needed on [[Alleya polkovodcev (Yaroslavl')]] *** No changes were needed on [[Alleya Geroev (Sankt-Peterburg)]] *** Traceback (most recent call last): File "core/pwb.py", line 222, in <module> run_python_file(filename, argv, argvu, file_package) File "core/pwb.py", line 81, in run_python_file main_mod.__dict__) File "core/scripts/reflinks.py", line 846, in <module> main() File "core/scripts/reflinks.py", line 843, in main bot.run() File "core/scripts/reflinks.py", line 605, in run compressed = io.StringIO(f.read()) TypeError: initial_value must be unicode or None, not str CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: Rubin16 Cc: Aklapper, Rubin16, jayvdb, pywikipedia-bugs
Xqt edited the task description. Xqt set Security to none.
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: Aklapper, Rubin16, jayvdb, pywikipedia-bugs
Mpaa added a subscriber: Mpaa. Mpaa added a comment.
I was not able to reproduce it. Can you provide the full command you used?
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: Mpaa Cc: Mpaa, Aklapper, Rubin16, jayvdb, pywikipedia-bugs
Rubin16 added a comment.
If it is possible, I will send you a set of tracebacks with errors in other articles a couple of week later - I am on the business trip now with no access to Labs... I'll copy the exact command, too.
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: Rubin16 Cc: Mpaa, Aklapper, Rubin16, jayvdb, pywikipedia-bugs
Aklapper changed the task status from "Open" to "Stalled". Aklapper added a comment.
[Please reset task status once provided]
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: Aklapper Cc: Mpaa, Aklapper, Rubin16, jayvdb, pywikipedia-bugs
XZise added a subscriber: XZise. XZise added a comment.
This is strange. If it's compressed it's put into a `io.StringIO` object? For binary data (which is what compressed data is) the `io.BytesIO` should be used. There is also `StringIO.StringIO` which accepts both, but was removed in Python 3 so using that should be avoided. Maybe someone (probably me https://github.com/wikimedia/pywikibot-core/commit/87df10e451a5a67fab293e18a4c98a2dd6acd925#diff-3 and me https://github.com/wikimedia/pywikibot-core/commit/dd558f287f6e786a41a881b0956e43130260a385#diff-13) has changed it from `StringIO.StringIO` to `io.StringIO` because the latter is available in both and they function similar. So I think there is actually a bug, although I'm not sure why @Mpaa hasn't experienced it. Maybe that section of code wasn't used.
TASK DETAIL https://phabricator.wikimedia.org/T86462
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, Mpaa, Aklapper, Rubin16, jayvdb, pywikipedia-bugs
gerritbot added a subscriber: gerritbot. gerritbot added a project: Patch-For-Review. gerritbot added a comment.
Change 186950 had a related patch set uploaded (by XZise): [FIX] reflinks: Use BytesIO for binary data
https://gerrit.wikimedia.org/r/186950
https://phabricator.wikimedia.org/tag/patch-for-review/
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: gerritbot Cc: gerritbot, XZise, Mpaa, Aklapper, Rubin16, jayvdb, pywikipedia-bugs
XZise added a comment.
I've provided a patch as it looks wrong to me, but I haven't tested it before or afterwards so I'm not sure if this does solve it as @Mpaa hasn't had that problem (although if no gzipped reflink was processed it doesn't happen).
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: gerritbot, XZise, Mpaa, Aklapper, Rubin16, jayvdb, pywikipedia-bugs
gerritbot added a comment.
Change 186950 merged by jenkins-bot: [FIX] reflinks: Use BytesIO for binary data
https://gerrit.wikimedia.org/r/186950
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: gerritbot Cc: gerritbot, XZise, Mpaa, Aklapper, Rubin16, jayvdb, pywikipedia-bugs
Rubin16 closed this task as "Resolved". Rubin16 claimed this task. Rubin16 added a comment.
Seems to be fixed now.
TASK DETAIL https://phabricator.wikimedia.org/T86462
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: Rubin16 Cc: gerritbot, XZise, Mpaa, Aklapper, Rubin16, jayvdb, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org