XZise added a comment.

I guess with Sun, Jun 21, 12:23 you mean 
https://phabricator.wikimedia.org/T103253#1385780 (it shows to me 10:23 which 
would make sense as I've afaik set it to UTC and you probably to CEST). And 
these work without any API. I've looked more closely in the error from the 
opening post (and https://phabricator.wikimedia.org/T103253#1385697). This code 
is only executed when the API returns an error starting with 
`internal_api_error_` which might not happen reliably (@jayvdb had mentioned 
something about a problem recently with the WMF wikis).

On the other hand if you tried it with a version before 
https://phabricator.wikimedia.org/rPWBCb44e59ae60a65bcba0e5fbc6d1941f1edcdc640c 
was merged I'm wondering what is happening there and if something else could 
lead to that result. The only types in `_params` are afaik `bool`, `int`, 
`unicode`, `bytes` and `OptionSet`. The first four should be save from any 
encoding issues (e.g. `repr(u'äöü'.encode('utf8'))` returns 
`'\xc3\xa4\xc3\xb6\xc3\xbc'` and `repr(u'äöü')` does return `u'\xe4\xf6\xfc'`). 
I'll look into `OptionSet` but it's not used while saving afaik. And even if 
that is the source of the issue I think @valhallasw's patch would help.

I'm thought about writing a test for the original issue but when it only 
happens on an error it's hard to actually get that to happen. I'd need to 
monkey patch the `pywikibot.data.api` module to not call the actual 
`http.request` but manually return an error.


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

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

To: Xqt, XZise
Cc: valhallasw, jayvdb, gerritbot, XZise, Aklapper, Xqt, pywikibot-bugs-list



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

Reply via email to