zhuyifei1999 added a comment.
connect: (
commons.wikimedia.org, 443)
send: u'GET
/w/api.php?maxlag=5&format=json&rawcontinue=&meta=userinfo&action=query&uiprop=blockinfo%7Cgroups%7Chasmsg%7Crights
HTTP/1.1\r\nHost: commons.wikimedia.org\r\ncontent-type:
application/x-www-form-urlencoded\r\nconnection: keep-alive\r\ncookie:
centralauth_Token=78b8f029c49c2f259939a0b5dadd6c8a; centralauth_User=YiFeiBot;
forceHTTPS=1; commonswikiUserID=2915654; forceHTTPS=true;
commonswikiUserName=YiFeiBot\r\naccept-encoding: gzip, deflate\r\nuser-agent: flickrAZ
(commons:commons; User:YiFeiBot) Pywikibot/2.0b3 (g5523) httplib2/0.8
Python/2.7.6.final.0\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx/1.6.2
header: Date: Sun, 17 May 2015 01:11:33 GMT
header: Content-Type: application/json; charset=utf-8
header: Content-Length: 465
header: Connection: keep-alive
header: X-Powered-By: HHVM/3.6.1
header: X-Content-Type-Options: nosniff
header: Cache-control: private, must-revalidate, max-age=0
header: X-Frame-Options: SAMEORIGIN
header: Content-Encoding: gzip
header: Vary: Accept-Encoding
header: Set-Cookie: commonswikiSession=244c342c5006ef116c903f7b68678c79; path=/; secure;
httponly
header: X-Varnish: 968174735, 3348394954
header: Via: 1.1 varnish, 1.1 varnish
header: Accept-Ranges: bytes
header: Age: 0
header: X-Cache: cp1054 miss (0), cp1068 frontend miss (0)
header: Set-Cookie: GeoIP=::::v4; Path=/;
Domain=.wikimedia.org
header: X-Analytics: https=1
header: Set-Cookie: WMF-Last-Access=17-May-2015;Path=/;HttpOnly;Expires=Thu, 18 Jun 2015
00:00:00 GMT
Page 1
Ryanair, EI-DWP, Boeing 737-8AS (17737230072).jpg
send: u'GET
/w/api.php?inprop=protection&titles=File%3ARyanair%2C+EI-DWP%2C+Boeing+737-8AS+%2817737230072%29.jpg&continue=&format=json&prop=info&meta=userinfo&indexpageids=&action=query&maxlag=5&uiprop=blockinfo%7Chasmsg
HTTP/1.1\r\nHost: commons.wikimedia.org\r\ncontent-type:
application/x-www-form-urlencoded\r\nconnection: keep-alive\r\ncookie: GeoIP=::::v4;
centralauth_Token=78b8f029c49c2f259939a0b5dadd6c8a; centralauth_User=YiFeiBot;
forceHTTPS=1; commonswikiSession=244c342c5006ef116c903f7b68678c79;
commonswikiUserID=2915654; forceHTTPS=true; WMF-Last-Access=17-May-2015;
commonswikiUserName=YiFeiBot\r\naccept-encoding: gzip, deflate\r\nuser-agent: flickrAZ
(commons:commons; User:YiFeiBot) Pywikibot/2.0b3 (g5523) httplib2/0.8
Python/2.7.6.final.0\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx/1.6.2
header: Date: Sun, 17 May 2015 01:11:33 GMT
header: Content-Type: application/json; charset=utf-8
header: Content-Length: 248
header: Connection: keep-alive
header: X-Powered-By: HHVM/3.6.1
header: X-Content-Type-Options: nosniff
header: Cache-control: private, must-revalidate, max-age=0
header: X-Frame-Options: SAMEORIGIN
header: Content-Encoding: gzip
header: Vary: Accept-Encoding
header: X-Varnish: 66566441, 3348396553
header: Via: 1.1 varnish, 1.1 varnish
header: Accept-Ranges: bytes
header: Age: 0
header: X-Cache: cp1065 miss (0), cp1068 frontend miss (0)
header: X-Analytics: https=1;WMF-Last-Access=17-May-2015
send: u'GET
/w/api.php?maxlag=5&format=json&rawcontinue=&meta=tokens%7Cuserinfo&action=query&type=csrf%7Ccsrf%7Cdeleteglobalaccount%7Cpatrol%7Crollback%7Csetglobalaccountstatus%7Cuserrights%7Cwatch&uiprop=blockinfo%7Chasmsg
HTTP/1.1\r\nHost: commons.wikimedia.org\r\ncontent-type:
application/x-www-form-urlencoded\r\nconnection: keep-alive\r\ncookie: GeoIP=::::v4;
centralauth_Token=78b8f029c49c2f259939a0b5dadd6c8a; centralauth_User=YiFeiBot;
forceHTTPS=1; commonswikiSession=244c342c5006ef116c903f7b68678c79;
commonswikiUserID=2915654; forceHTTPS=true; WMF-Last-Access=17-May-2015;
commonswikiUserName=YiFeiBot\r\naccept-encoding: gzip, deflate\r\nuser-agent: flickrAZ
(commons:commons; User:YiFeiBot) Pywikibot/2.0b3 (g5523) httplib2/0.8
Python/2.7.6.final.0\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx/1.6.2
header: Date: Sun, 17 May 2015 01:11:34 GMT
header: Content-Type: application/json; charset=utf-8
header: Content-Length: 321
header: Connection: keep-alive
header: X-Powered-By: HHVM/3.6.1
header: X-Content-Type-Options: nosniff
header: Cache-control: private, must-revalidate, max-age=0
header: X-Frame-Options: SAMEORIGIN
header: Content-Encoding: gzip
header: Vary: Accept-Encoding
header: X-Varnish: 968176035, 3348398412
header: Via: 1.1 varnish, 1.1 varnish
header: Accept-Ranges: bytes
header: Age: 0
header: X-Cache: cp1054 miss (0), cp1068 frontend miss (0)
header: X-Analytics: https=1;WMF-Last-Access=17-May-2015
Sleeping for 7.5 seconds, 2015-05-17 01:11:34
ERROR: Traceback (most recent call last):
File "/data/project/yifeibot/pywikibot/pywikibot/data/api.py", line 1556, in
submit
body=body, headers=headers)
File "/data/project/yifeibot/pywikibot/pywikibot/tools/__init__.py", line
1094, in wrapper
return obj(*__args, **__kw)
File "/data/project/yifeibot/pywikibot/pywikibot/comms/http.py", line 279,
in request
r = fetch(baseuri, method, body, headers, **kwargs)
File "/data/project/yifeibot/pywikibot/pywikibot/comms/http.py", line 381,
in fetch
error_handling_callback(request)
File "/data/project/yifeibot/pywikibot/pywikibot/comms/http.py", line 297,
in error_handling_callback
raise request.data
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 1850:
ordinal not in range(128)
I believe the UnicodeDecodeError happened before the upload request is really sent.
The exact values is:
site.upload(pywikibot.FilePage(site, "File:Ryanair, EI-DWP, Boeing 737-8AS
(17737230072).jpg"), source_filename="temp/fli.tmp",
comment="[[Commons:Bots|Bot]]: Uploading files from Flickr",
ignore_warnings=False)
git diff shows nothing and git status shows HEAD detached at
https://phabricator.wikimedia.org/rPWBCd798da349087d231d9dad203cd6b48a1aea0…
TASK DETAIL
https://phabricator.wikimedia.org/T99366
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: zhuyifei1999
Cc: valhallasw, XZise, Aklapper, zhuyifei1999, jayvdb, pywikipedia-bugs