jayvdb moved this task to WMF production issues on the pywikibot-core workboard.
TASK DETAIL
https://phabricator.wikimedia.org/T75534
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb
Cc: pywikipedia-bugs, XZise, jayvdb
jayvdb moved this task to WMF production issues on the pywikibot-core workboard.
TASK DETAIL
https://phabricator.wikimedia.org/T75170
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb
Cc: pywikipedia-bugs, He7d3r, XZise, Multichill, jayvdb
jayvdb moved this task to WMF production issues on the pywikibot-core workboard.
TASK DETAIL
https://phabricator.wikimedia.org/T75545
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb
Cc: pywikipedia-bugs, Danilo, jayvdb
jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
jayvdb changed Security from none to none.
TASK DESCRIPTION
Exception on Windows, using either py3.3 or py3.4
```
C:\pywikibot\core>c:\Python34\python.exe .\generate_user_files.py
WARNING: Skipping loading of user-config.py.
WARNING: Running on Windows and transliteration_target is not set.
Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot/Wi
ndows
WARNING: family and mylang are not set.
Defaulting to family='test' and mylang='test'.
Your default user directory is "C:\pywikibot\core"
Do you want to use that directory? ([y]es, [N]o) y
Traceback (most recent call last):
File ".\generate_user_files.py", line 325, in <module>
default=False, automatic_quit=False):
File "C:\pywikibot\core\pywikibot\bot.py", line 565, in input_yn
automatic_quit=automatic_quit) == 'y'
File "C:\pywikibot\core\pywikibot\bot.py", line 537, in input_choice
automatic_quit)
File "C:\pywikibot\core\pywikibot\userinterfaces\terminal_interface_base.py",
line 279, in input_choice
answer = self.input(question)
File "C:\pywikibot\core\pywikibot\userinterfaces\terminal_interface_base.py", line 203, in input
text = self._raw_input()
File "C:\pywikibot\core\pywikibot\userinterfaces\terminal_interface_win32.py", line 97, in _raw_input
if '\x1a' in data:
TypeError: Type str doesn't support the buffer API
<class 'TypeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
```
TASK DETAIL
https://phabricator.wikimedia.org/T76236
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb
Cc: pywikipedia-bugs, jayvdb
jayvdb added a blocking task: T76211: pywikibot externals opencv and pycolorname used by catimages.py.
TASK DETAIL
https://phabricator.wikimedia.org/T66838
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb
Cc: pywikipedia-bugs, valhallasw, Ricordisamoa, jayvdb, Xqt
jayvdb added a comment.
I just received a DBQueryError on this test.
```
2014-11-29 01:41:35 threadedhttp.py, 219 in request: DEBUG ('https://en.wikipedia.org/w/api.php?inprop=protection&giulimit=5&maxlag=5&ge…', 'GET', None, {'cookie': 'forceHTTPS=true; enwikiUserName=JVbot; enwikiSession=....; enwikiUserID=5197800; GeoIP=ID:Jakarta:...:v4; centralauth_Token=....; centralauth_User=JVbot; forceHTTPS=1', 'connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded', 'user-agent': u'python -m unittest (wikipedia:en; User:JVbot) Pywikibot/2.0b2 (g4649) httplib2/0.9 Python/2.7.5.final.0'}, 5, None)
2014-11-29 01:42:35 api.py, 966 in submit: DEBUG API response received from wikipedia:en:
{"servedby":"mw1221","error":{"code":"internal_api_error_DBQueryError","info":"Database query error","*":""}}
2014-11-29 01:42:35 api.py, 1043 in submit: ERROR Detected MediaWiki API exception DBQueryError; retrying
2014-11-29 01:42:35 api.py, 1049 in submit: VERBOSE MediaWiki exception DBQueryError details:
query=
{'action': [u'query'],
'continue': [u''],
'format': ['json'],
'generator': [u'imageusage'],
'giufilterredir': [u'redirects'],
u'giulimit': [u'5'],
'giutitle': [u'File:Wiktionary-logo-en.svg'],
'iiprop': [u'timestamp',
u'user',
u'comment',
u'url',
u'size',
u'sha1',
u'metadata'],
'indexpageids': [u''],
'inprop': [u'protection'],
'maxlag': ['5'],
'meta': ['userinfo'],
'prop': [u'info', u'imageinfo', u'categoryinfo'],
'uiprop': ['blockinfo', 'hasmsg']}
response=
{u'servedby': u'mw1221', u'error': {'help': u''}}
2014-11-29 01:42:35 api.py, 1081 in wait: WARNING Waiting 5 seconds before retrying.
2014-11-29 01:42:40 threadedhttp.py, 92 in pop_connection: DEBUG Retrieved connection from 'https:en.wikipedia.org' pool.
2014-11-29 01:42:40 threadedhttp.py, 219 in request: DEBUG ('https://en.wikipedia.org/w/api.php?inprop=protection&giulimit=5&maxlag=5&ge…', 'GET', None, {'cookie': 'forceHTTPS=true; enwikiUserName=JVbot; enwikiSession=...; enwikiUserID=5197800; GeoIP=ID:Jakarta:...:v4; centralauth_Token=...; centralauth_User=JVbot; forceHTTPS=1', 'connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded', 'user-agent': u'python -m unittest (wikipedia:en; User:JVbot) Pywikibot/2.0b2 (g4649) httplib2/0.9 Python/2.7.5.final.0'}, 5, None)
2014-11-29 01:44:40 api.py, 959 in submit: ERROR Traceback (most recent call last):
File "pywikibot/data/api.py", line 937, in submit
headers=headers, body=body)
File "pywikibot/tools.py", line 679, in wrapper
return obj(*__args, **__kw)
File "pywikibot/comms/http.py", line 261, in request
raise request.data
SSLError: The read operation timed out
```
>>! In T73971#755541, @Mpaa wrote:
> (In reply to John Mark Vandenberg from comment #13)
>> Changes to the tests have been merged. Underlying problem hasnt been fixed.
>
> I do not think there is an underlying problem in test_image_usage_in_redirects.
> The API is already slow by itself when called with those parameters.
Yes, I had hoped that mediawiki devs might help diagnose this problem.
> One solution would be to change the logic that we currently use for setting the query limits.
> I think this can be avoided just raising the number of retrieved tems from 5 to 500 instead of @expectedFailureIf(TRAVIS=true) on imageusage test.
This sounds like a good approach. For queries we know are problematic (from experience), QueryGenerator can adjust the limits used in the API query (maybe try unlimited) , and QueryGenerator enforces the limit internally.
TASK DETAIL
https://phabricator.wikimedia.org/T73971
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb
Cc: pywikipedia-bugs, Legoktm, valhallasw, XZise, jayvdb, Mpaa
XZise removed a subscriber: XZise.
TASK DETAIL
https://phabricator.wikimedia.org/T74504
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: XZise
Cc: pywikipedia-bugs, jayvdb
XZise added a comment.
Hmm, https://docs.python.org/2/library/calendar.html#calendar.monthrange should do the trick then.
```
import datetime
import calendar
def month_delta(date, month_delta=1):
if int(month_delta) != month_delta:
raise ValueError('Month delta must be an integer')
while month_delta > 0:
date += datetime.timedelta(days=calendar.monthrange(
date.year, date.month)[1])
month_delta -= 1
return date
```
Though this //just// supports non-negative deltas but without any external library or pywikibot specific code.
TASK DETAIL
https://phabricator.wikimedia.org/T73124
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: XZise
Cc: pywikipedia-bugs, Legoktm, jayvdb, XZise, Multichill, Xqt
jayvdb removed a project: testme.
jayvdb set Security to none.
TASK DETAIL
https://phabricator.wikimedia.org/T67675
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb
Cc: pywikipedia-bugs, valhallasw, XZise, jayvdb, Xqt